Skip to content

Commit

Permalink
improve: [ChatBot] tidy prints
Browse files Browse the repository at this point in the history
  • Loading branch information
luochen1990 committed Aug 5, 2024
1 parent 58f3dcf commit c182fa3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ai_powered/tool_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,13 @@ def schema(self) -> ChatCompletionToolParam:
docstring = inspect.getdoc(self.fn)

if DEBUG:
print(f"{sig =}")
print(f"{docstring =}")

for param in sig.parameters.values():
print(f"{param.name}: {param.annotation}")

print(f"{sig.return_annotation =}")
print(f"[MakeTool.schema()] {sig =}")

raw_schema = msgspec.json.schema(self.struct_of_parameters())
parameters_schema = deref(raw_schema)

if DEBUG:
print(yellow(f"{parameters_schema =}"))
print(yellow(f"[MakeTool.schema()] {parameters_schema =}"))

return {
"type": "function",
Expand Down

0 comments on commit c182fa3

Please sign in to comment.