Skip to content

Commit

Permalink
limit tool description for openai
Browse files Browse the repository at this point in the history
  • Loading branch information
genekogan committed Jan 13, 2025
1 parent 1523c97 commit 066870e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions eve/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def openai_schema(self, exclude_hidden: bool = False) -> dict[str, Any]:
schema = openai_schema(self.model).openai_schema
if exclude_hidden:
self._remove_hidden_fields(schema["parameters"])
schema["description"] = schema["description"][:1024] # OpenAI tool description limit
return {"type": "function", "function": schema}

def calculate_cost(self, args):
Expand Down

0 comments on commit 066870e

Please sign in to comment.