两个数相加
| 12 | b: int = Field(description="第二个数") |
| 13 | |
| 14 | class AddNumbersTool(BaseTool): |
| 15 | """两个数相加""" |
| 16 | name: str = "add_numbers" |
| 17 | description: str = "两个数相加" |
| 18 | args_schema: Type[AddNumbersArgs] = AddNumbersArgs |
| 19 | |
| 20 | def _run(self, a: int, b: int) -> int: |
| 21 | return a + b |
| 22 | |
| 23 | async def _arun(self, a: int, b: int) -> int: |
| 24 | return a + b |
| 25 | |
| 26 | |
| 27 | llm = ChatOpenAI(model="gpt-4o", temperature=0) |
no outgoing calls
no test coverage detected