@@ -1327,7 +1327,7 @@ def _create_completion(
13271327 stopping_criteria : Optional [StoppingCriteriaList ] = None ,
13281328 logits_processor : Optional [LogitsProcessorList ] = None ,
13291329 grammar : Optional [LlamaGrammar ] = None ,
1330- logit_bias : Optional [Dict [int , float ]] = None ,
1330+ logit_bias : Optional [Dict [str , float ]] = None ,
13311331 ) -> Union [
13321332 Iterator [CreateCompletionResponse ], Iterator [CreateCompletionStreamResponse ]
13331333 ]:
@@ -1828,6 +1828,7 @@ def create_completion(
18281828 stopping_criteria : Optional [StoppingCriteriaList ] = None ,
18291829 logits_processor : Optional [LogitsProcessorList ] = None ,
18301830 grammar : Optional [LlamaGrammar ] = None ,
1831+ logit_bias : Optional [Dict [str , float ]] = None ,
18311832 ) -> Union [CreateCompletionResponse , Iterator [CreateCompletionStreamResponse ]]:
18321833 """Generate text from a prompt.
18331834
@@ -1876,6 +1877,7 @@ def create_completion(
18761877 stopping_criteria = stopping_criteria ,
18771878 logits_processor = logits_processor ,
18781879 grammar = grammar ,
1880+ logit_bias = logit_bias ,
18791881 )
18801882 if stream :
18811883 chunks : Iterator [CreateCompletionStreamResponse ] = completion_or_chunks
@@ -1909,6 +1911,7 @@ def __call__(
19091911 stopping_criteria : Optional [StoppingCriteriaList ] = None ,
19101912 logits_processor : Optional [LogitsProcessorList ] = None ,
19111913 grammar : Optional [LlamaGrammar ] = None ,
1914+ logit_bias : Optional [Dict [str , float ]] = None ,
19121915 ) -> Union [CreateCompletionResponse , Iterator [CreateCompletionStreamResponse ]]:
19131916 """Generate text from a prompt.
19141917
@@ -1957,6 +1960,7 @@ def __call__(
19571960 stopping_criteria = stopping_criteria ,
19581961 logits_processor = logits_processor ,
19591962 grammar = grammar ,
1963+ logit_bias = logit_bias ,
19601964 )
19611965
19621966 def create_chat_completion (
0 commit comments