Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrl committed Feb 5, 2024
1 parent 2b608af commit a9b68b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion integrations/cohere/tests/test_cohere_chat_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ def test_live_run(self):
@pytest.mark.integration
def test_live_run_wrong_model(self, chat_messages):
component = CohereChatGenerator(model="something-obviously-wrong", api_key=os.environ.get("COHERE_API_KEY"))
with pytest.raises(cohere.CohereAPIError, match="finetuned model something-obviously-wrong is not valid"):
with pytest.raises(
cohere.CohereAPIError,
match="model not found, make sure the correct model ID was used and that you have access to the model.",
):
component.run(chat_messages)

@pytest.mark.skipif(
Expand Down
2 changes: 1 addition & 1 deletion integrations/cohere/tests/test_cohere_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def __init__(self):
self.responses = ""

def __call__(self, chunk):
self.responses += chunk.text
self.responses += chunk.content
return chunk

callback = Callback()
Expand Down

0 comments on commit a9b68b3

Please sign in to comment.