Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add conversation id to test async chat #282

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/async/test_async_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
@pytest.mark.asyncio
async def test_async_multi_replies(async_client):
num_replies = 3
prediction = await async_client.chat("Yo what's up?", return_chatlog=True, max_tokens=5)
prediction = await async_client.chat(
"Yo what's up?", return_chatlog=True, max_tokens=5, conversation_id="test_conv_id"
)
assert prediction.chatlog is not None
for _ in range(num_replies):
prediction = await prediction.respond("oh that's cool", max_tokens=5)
Expand All @@ -21,6 +23,7 @@ async def test_async_chat_stream(async_client):
res = await async_client.chat(
message="wagmi",
max_tokens=5,
conversation_id="test_conv_id",
stream=True,
)

Expand Down
Loading