Skip to content

Commit

Permalink
support o1
Browse files Browse the repository at this point in the history
  • Loading branch information
pablonyx committed Dec 18, 2024
1 parent 23ecf65 commit dcc3913
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
4 changes: 3 additions & 1 deletion backend/onyx/llm/chat_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,9 @@ def _stream_implementation(
if LOG_DANSWER_MODEL_INTERACTIONS:
self.log_model_configs()

if DISABLE_LITELLM_STREAMING:
if (
DISABLE_LITELLM_STREAMING or self.config.model_name == "o1-2024-12-17"
): # TODO: remove once litellm supports streaming
yield self.invoke(prompt, tools, tool_choice, structured_response_format)
return

Expand Down
1 change: 1 addition & 0 deletions backend/onyx/llm/llm_provider_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class WellKnownLLMProviderDescriptor(BaseModel):
OPEN_AI_MODEL_NAMES = [
"o1-mini",
"o1-preview",
"o1-2024-12-17",
"gpt-4",
"gpt-4o",
"gpt-4o-mini",
Expand Down
5 changes: 3 additions & 2 deletions backend/requirements/default.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ trafilatura==1.12.2
langchain==0.1.17
langchain-core==0.1.50
langchain-text-splitters==0.0.1
litellm==1.54.1
litellm==1.55.4
lxml==5.3.0
lxml_html_clean==0.2.2
llama-index==0.9.45
Expand Down Expand Up @@ -81,4 +81,5 @@ stripe==10.12.0
urllib3==2.2.3
mistune==0.8.4
sentry-sdk==2.14.0
prometheus_client==0.21.0
prometheus_client==0.21.0
markitdown=0.0.1a3
2 changes: 1 addition & 1 deletion backend/requirements/model_server.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ torch==2.2.0
transformers==4.39.2
uvicorn==0.21.1
voyageai==0.2.3
litellm==1.54.1
litellm==1.55.4
sentry-sdk[fastapi,celery,starlette]==2.14.0
1 change: 1 addition & 0 deletions web/src/lib/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ const MODEL_DISPLAY_NAMES: { [key: string]: string } = {
// OpenAI models
"o1-mini": "O1 Mini",
"o1-preview": "O1 Preview",
"o1-2024-12-17": "O1",
"gpt-4": "GPT 4",
"gpt-4o": "GPT 4o",
"gpt-4o-2024-08-06": "GPT 4o (Structured Outputs)",
Expand Down

0 comments on commit dcc3913

Please sign in to comment.