Skip to content

Commit

Permalink
Merge pull request #184 from SkanderHellal/master
Browse files Browse the repository at this point in the history
Fix issue #183: OpenChat API Non-Deterministic Behavior
  • Loading branch information
imoneoi authored Mar 4, 2024
2 parents 30da91b + 88686d2 commit 7fbad42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ochat/serving/openai_api_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class ChatCompletionRequest(BaseModel):
top_p: Optional[float] = 1.0
n: Optional[int] = 1
max_tokens: Optional[int] = None
seed: Optional[int] = None
stop: Optional[Union[str, List[str]]] = None
stream: Optional[bool] = False
presence_penalty: Optional[float] = 0.0
Expand Down
1 change: 1 addition & 0 deletions ochat/serving/openai_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ async def create_chat_completion(raw_request: Request, background_tasks: Backgro
temperature=request.temperature,
top_p=request.top_p,
max_tokens=request.max_tokens,
seed=request.seed,
# Override stop tokens
stop_token_ids=model.eot_tokens,
ignore_eos=True
Expand Down

0 comments on commit 7fbad42

Please sign in to comment.