Skip to content

Commit

Permalink
set maximum_tokens to a limit (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
fgebhart authored Jan 17, 2025
1 parent 138349c commit 49dd48c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ async def test_can_not_chat_with_all_models(async_client: AsyncClient, model_nam
request = ChatRequest(
messages=[Message(role=Role.User, content="Hello, how are you?")],
model=model_name,
maximum_tokens=7,
)

with pytest.raises(ValueError):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ async def test_can_use_streaming_support_with_async_client(
def test_complete_maximum_tokens_none(sync_client: Client, model_name: str):
request = CompletionRequest(
prompt=Prompt.from_text("Hello, World!"),
maximum_tokens=None,
maximum_tokens=7,
stop_sequences=[","],
)

Expand Down

0 comments on commit 49dd48c

Please sign in to comment.