MCPcopy Index your code
hub / github.com/chenfei-wu/TaskMatrix / execute

Method execute

LowCodeLLM/src/executingLLM.py:34–42  ·  view source on GitHub ↗

provide LLM the dialogue history and the current prompt to get response

(self, current_prompt, history)

Source from the content-addressed store, hash-verified

32 {"role": "system", "content": self.prefix}]
33
34 def execute(self, current_prompt, history):
35 ''' provide LLM the dialogue history and the current prompt to get response '''
36 messages = self.messages + history
37 messages.append({'role': 'user', "content": current_prompt + self.suffix})
38 response, status = self.LLM.run(messages)
39 if status:
40 return response
41 else:
42 return "OpenAI API error."

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected