agents
agents copied to clipboard
Add Support for OpenAI Assistants API to OpenAI plugin
Describe the bug
The assistants completion API is slightly different from the base model completions api so the base_url cannot be simply swapped to the endpoint of an Assistant.
To Reproduce
- Swap OpenAI plugin
base_urlto an Assistantbase urlformatted ashttps://api.openai.com/v1/assistants/{assistant_id}/messages - Attempt to use the assistant for completions
- Receive stack trace around argument mismatch in
LLM.chat()
Expected behavior Assistant completions work as expected (similarly to base model completions)
This is already available but it's hiding somewhat.
See docs here: https://github.com/livekit/agents/tree/main/livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/beta/README.md