Skip to content

Commit

Permalink
Merge pull request #309 from PrefectHQ/gemini
Browse files Browse the repository at this point in the history
Improve gemini support
  • Loading branch information
jlowin authored Sep 13, 2024
2 parents ad2b455 + c3046bf commit 4a22fb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controlflow/tools/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ class Tool(ControlFlowModel):
metadata: dict = {}

fn: Callable = Field(None, exclude=True)
_lc_tool: Optional[langchain_core.tools.BaseTool] = None

def to_lc_tool(self) -> dict:
payload = self.model_dump(include={"name", "description", "parameters"})
return dict(type="function", function=payload)
return payload

@prefect_task(task_run_name="Tool call: {self.name}")
def run(self, input: dict):
Expand Down

0 comments on commit 4a22fb8

Please sign in to comment.