danny-avila / LibreChat

Enhanced ChatGPT Clone: Features Anthropic, AWS, OpenAI, Assistants API, Azure, Groq, o1, GPT-4o, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, langchain, DALL-E-3, ChatGPT Plugins, OpenAI Functions, Secure Multi-User System, Presets, completely open-source for self-hosting. Actively in public development.
https://librechat.ai/
MIT License
19.33k stars 3.23k forks source link

🌊 feat: add streaming support for o1 models #4760

Closed hongkai-neu closed 5 days ago

hongkai-neu commented 6 days ago

Add streaming support for o1 models

Issue #4759 : Enhancement: Add streaming support for o1-preview and o1-mini

Summary

This PR adds streaming support for o1 models by removing the if condition that was checking if the model was o1 before deleting the modelOptions.stream and modelOptions.stop parameters in the OpenAIClient.js file.

Change Type

Testing

Backend unit tests are passed: npm run test:api

clip

Checklist

hongkai-neu commented 5 days ago

Streaming with o1-mini and o1-preview work fine with OpenAI/OpenRouter but haven’t been tested with Azure OpenAI due to no API access.

hongkai-neu commented 5 days ago

Streaming with o1-mini and o1-preview work fine with OpenAI/OpenRouter but haven’t been tested with Azure OpenAI due to no API access.