Skip to content

Commit

Permalink
another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahkady committed Aug 30, 2024
1 parent 2ec0181 commit ce9a274
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/test_client_v2.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import json
import os
import typing
import unittest

import cohere
from cohere import TextContent, ChatDocument, ToolMessage2, UserMessage, AssistantMessage
from cohere import ToolMessage2, UserMessage, AssistantMessage

co = cohere.ClientV2(timeout=10000)

Expand Down Expand Up @@ -43,13 +42,10 @@ def test_chat_documents(self) -> None:
{"title": "widget sales 2020", "text": "2 million"},
{"title": "widget sales 2021", "text": "4 million"},
]
docs: typing.List[ChatDocument] = []
for doc in documents:
docs.append(ChatDocument(id="1", document=doc))
response = co.chat(
messages=cohere.v2.UserMessage(
content=cohere.v2.TextContent(text="how many widges were sold in 2020?"),
documents=docs,
documents=documents,
),
)

Expand Down

0 comments on commit ce9a274

Please sign in to comment.