From b8543c07eed7c6e3f8fc6711f253a494243089f5 Mon Sep 17 00:00:00 2001 From: Lucas Fayoux Date: Thu, 7 Sep 2023 14:01:45 -0400 Subject: [PATCH] update chat test to use a new conversaion_id on each run --- tests/async/test_async_chat.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/async/test_async_chat.py b/tests/async/test_async_chat.py index a51e48c0c..a3f2f9edd 100644 --- a/tests/async/test_async_chat.py +++ b/tests/async/test_async_chat.py @@ -1,3 +1,4 @@ +import conftest import pytest import cohere @@ -13,9 +14,10 @@ @pytest.mark.asyncio async def test_async_multi_replies(async_client): + conversation_id = f"test_conv_{conftest.random_word()}" num_replies = 3 prediction = await async_client.chat( - "Yo what's up?", return_chatlog=True, max_tokens=5, conversation_id="test_conv_id" + "Yo what's up?", return_chatlog=True, max_tokens=5, conversation_id=conversation_id ) assert prediction.chatlog is not None for _ in range(num_replies): @@ -30,10 +32,11 @@ async def test_async_multi_replies(async_client): @pytest.mark.asyncio async def test_async_chat_stream(async_client): + conversation_id = f"test_conv_{conftest.random_word()}" res = await async_client.chat( message="wagmi", max_tokens=5, - conversation_id="test_conv_id", + conversation_id=conversation_id, stream=True, )