mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
feat(main.py): support router.chat.completions.create
allows using router with instructor https://github.com/BerriAI/litellm/issues/2673
This commit is contained in:
parent
9e9de7f6e2
commit
f98aead602
3 changed files with 91 additions and 42 deletions
|
@ -230,7 +230,7 @@ class Router:
|
|||
) # dict to store aliases for router, ex. {"gpt-4": "gpt-3.5-turbo"}, all requests with gpt-4 -> get routed to gpt-3.5-turbo group
|
||||
|
||||
# make Router.chat.completions.create compatible for openai.chat.completions.create
|
||||
self.chat = litellm.Chat(params=default_litellm_params)
|
||||
self.chat = litellm.Chat(params=default_litellm_params, router_obj=self)
|
||||
|
||||
# default litellm args
|
||||
self.default_litellm_params = default_litellm_params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue