Support o1 model on Azure (#4980)
Co-authored-by: Shan Yu <shanyu1@g.ucla.edu>
This commit is contained in:
@@ -161,7 +161,11 @@ class OpenAI(BaseBackend):
|
|||||||
prompt = s.text_
|
prompt = s.text_
|
||||||
|
|
||||||
kwargs = sampling_params.to_openai_kwargs()
|
kwargs = sampling_params.to_openai_kwargs()
|
||||||
if self.model_name.startswith("o1") or self.model_name.startswith("o3"):
|
if (
|
||||||
|
self.model_name.startswith("o1")
|
||||||
|
or self.model_name.startswith("o3")
|
||||||
|
or "o1" in self.model_name
|
||||||
|
):
|
||||||
kwargs.pop("max_tokens", None)
|
kwargs.pop("max_tokens", None)
|
||||||
else:
|
else:
|
||||||
kwargs.pop("max_completion_tokens", None)
|
kwargs.pop("max_completion_tokens", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user