Add tool_calling.py and test_tools.py

This commit is contained in:
2024-11-15 20:29:35 -05:00
parent a97f9be2c8
commit d5bdb712e9
2 changed files with 47 additions and 4 deletions
+4 -4
View File
@@ -4,7 +4,9 @@ import pytest
from pydantic import Field
import simplemind as sm
from simplemind.providers import Anthropic, BaseTool, OpenAI
from simplemind.providers import Anthropic, OpenAI
from simplemind.providers._base_tools import BaseTool
MODELS = [
Anthropic,
@@ -22,9 +24,7 @@ def get_weather(
],
unit: Annotated[
Literal["celcius", "fahrenheit"],
Field(
description="The unit of temperature, either 'celsius' or 'fahrenheit'"
),
Field(description="The unit of temperature, either 'celsius' or 'fahrenheit'"),
] = "celcius",
):
"""