@@ -1327,7 +1327,7 @@ def _create_completion(
1327
1327
stopping_criteria : Optional [StoppingCriteriaList ] = None ,
1328
1328
logits_processor : Optional [LogitsProcessorList ] = None ,
1329
1329
grammar : Optional [LlamaGrammar ] = None ,
1330
- logit_bias : Optional [Dict [int , float ]] = None ,
1330
+ logit_bias : Optional [Dict [str , float ]] = None ,
1331
1331
) -> Union [
1332
1332
Iterator [CreateCompletionResponse ], Iterator [CreateCompletionStreamResponse ]
1333
1333
]:
@@ -1828,6 +1828,7 @@ def create_completion(
1828
1828
stopping_criteria : Optional [StoppingCriteriaList ] = None ,
1829
1829
logits_processor : Optional [LogitsProcessorList ] = None ,
1830
1830
grammar : Optional [LlamaGrammar ] = None ,
1831
+ logit_bias : Optional [Dict [str , float ]] = None ,
1831
1832
) -> Union [CreateCompletionResponse , Iterator [CreateCompletionStreamResponse ]]:
1832
1833
"""Generate text from a prompt.
1833
1834
@@ -1876,6 +1877,7 @@ def create_completion(
1876
1877
stopping_criteria = stopping_criteria ,
1877
1878
logits_processor = logits_processor ,
1878
1879
grammar = grammar ,
1880
+ logit_bias = logit_bias ,
1879
1881
)
1880
1882
if stream :
1881
1883
chunks : Iterator [CreateCompletionStreamResponse ] = completion_or_chunks
@@ -1909,6 +1911,7 @@ def __call__(
1909
1911
stopping_criteria : Optional [StoppingCriteriaList ] = None ,
1910
1912
logits_processor : Optional [LogitsProcessorList ] = None ,
1911
1913
grammar : Optional [LlamaGrammar ] = None ,
1914
+ logit_bias : Optional [Dict [str , float ]] = None ,
1912
1915
) -> Union [CreateCompletionResponse , Iterator [CreateCompletionStreamResponse ]]:
1913
1916
"""Generate text from a prompt.
1914
1917
@@ -1957,6 +1960,7 @@ def __call__(
1957
1960
stopping_criteria = stopping_criteria ,
1958
1961
logits_processor = logits_processor ,
1959
1962
grammar = grammar ,
1963
+ logit_bias = logit_bias ,
1960
1964
)
1961
1965
1962
1966
def create_chat_completion (
0 commit comments