Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
billytrend-cohere committed Aug 9, 2024
1 parent f827a96 commit 250c622
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_client_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def test_chat_stream(self) -> None:

def test_chat_documents(self) -> None:
documents = [
{'title': 'widget sales 2019', 'text': '1 million'},
{'title': 'widget sales 2020', 'text': '2 million'},
{'title': 'widget sales 2021', 'text': '4 million'}
'widget sales 2019: 1 million',
'widget sales 2020: 2 million',
'widget sales 2021: 4 million'
]
content: typing.List[TextContent | DocumentContent] = [cohere.v2.TextContent(text="how many widges were sold in 2020?")]
for doc in documents:
Expand All @@ -80,7 +80,7 @@ def test_chat_tools(self) -> None:
}
tools = [cohere.v2.Tool2(type='function', function=get_weather_tool)]
messages: typing.List[UserMessage | AssistantMessage | None | ToolMessage2] = [cohere.v2.UserMessage(content='what is the weather in Toronto?')]
res = co.chat(tools=tools, messages=messages)
res = co.chat(model="command-r-plus", tools=tools, messages=messages)

# call the get_weather tool
tool_result = {"temperature": "30C"}
Expand Down

0 comments on commit 250c622

Please sign in to comment.