MCPcopy Create free account
hub / github.com/CL-lau/SQL-GPT / run

Method run

gpt/agent.py:91–102  ·  view source on GitHub ↗
(self, query: str)

Source from the content-addressed store, hash-verified

89 )
90
91 def run(self, query: str) -> Optional[str]:
92 response = None
93 with get_openai_callback() as callback:
94 try:
95 response = self.agent_.run(query)
96 except ValueError as e:
97 response = 'Something wrong in agent: ' + str(e)
98 if not response.startswith("Could not parse LLM output: `"):
99 raise e
100
101 print(callback)
102 return response

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected