MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / convert_prompt

Method convert_prompt

bmtools/agent/apitool.py:39–54  ·  view source on GitHub ↗
(self,params)

Source from the content-addressed store, hash-verified

37 return ret
38
39 def convert_prompt(self,params):
40 lines = "Your input should be a json (args json schema): {{"
41 for p in params:
42 logger.debug(p)
43 optional = not p['required']
44 description = p.get('description', '')
45 if len(description) > 0:
46 description = "("+description+")"
47
48 lines += '"{name}" : {type}{desc}, '.format(name=p['name'],
49 type= p['schema']['type'],
50 optional=optional,
51 desc=description)
52
53 lines += "}}"
54 return lines
55
56
57

Callers 1

__init__Method · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected