Skip to content

Commit

Permalink
fix: top_k_returns to top_k_return (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
asafgardin authored Jan 22, 2024
1 parent 11dd4da commit fe3765c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions ai21/clients/common/chat_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def create(
max_tokens: Optional[int] = 300,
min_tokens: Optional[int] = 0,
top_p: Optional[float] = 1.0,
top_k_returns: Optional[int] = 0,
top_k_return: Optional[int] = 0,
stop_sequences: Optional[List[str]] = None,
frequency_penalty: Optional[Penalty] = None,
presence_penalty: Optional[Penalty] = None,
Expand All @@ -43,7 +43,7 @@ def _create_body(
max_tokens: Optional[int] = 300,
min_tokens: Optional[int] = 0,
top_p: Optional[float] = 1.0,
top_k_returns: Optional[int] = 0,
top_k_return: Optional[int] = 0,
stop_sequences: Optional[List[str]] = None,
frequency_penalty: Optional[Penalty] = None,
presence_penalty: Optional[Penalty] = None,
Expand All @@ -58,7 +58,7 @@ def _create_body(
"minTokens": min_tokens,
"numResults": num_results,
"topP": top_p,
"topKReturn": top_k_returns,
"topKReturn": top_k_return,
"stopSequences": stop_sequences,
"frequencyPenalty": None if frequency_penalty is None else frequency_penalty.to_dict(),
"presencePenalty": None if presence_penalty is None else presence_penalty.to_dict(),
Expand Down
4 changes: 2 additions & 2 deletions ai21/clients/studio/resources/studio_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def create(
max_tokens: Optional[int] = 300,
min_tokens: Optional[int] = 0,
top_p: Optional[float] = 1.0,
top_k_returns: Optional[int] = 0,
top_k_return: Optional[int] = 0,
stop_sequences: Optional[List[str]] = None,
frequency_penalty: Optional[Penalty] = None,
presence_penalty: Optional[Penalty] = None,
Expand All @@ -35,7 +35,7 @@ def create(
max_tokens=max_tokens,
min_tokens=min_tokens,
top_p=top_p,
top_k_returns=top_k_returns,
top_k_return=top_k_return,
stop_sequences=stop_sequences,
frequency_penalty=frequency_penalty,
presence_penalty=presence_penalty,
Expand Down

0 comments on commit fe3765c

Please sign in to comment.