Closed yahor-filipchyk closed 5 months ago
Hey @yahor-filipchyk , it's definitely possible! Check out these two examples:
I agree it would be better to incorporate the routing of streaming functions to adapters
abstraction. It's on my list :)
@peterbanda perfect! Didn't realize OpenAIChatCompletionStreamedServiceRouter
was already available!
Currently the
OpenAIServiceAdapters#chatCompletionRouter
only works with instances of typeOpenAIChatCompletionService
. It would be nice also to have a router forOpenAIChatCompletionStreamedServiceExtra
.I am looking to add Anthropic to the list of supported models. Most of our user experiences require streaming. Since
OpenAIAnthropicChatCompletionService
already implements bothOpenAIAnthropicChatCompletionService
andOpenAIChatCompletionStreamedServiceExtra
I imagine it wouldn't be hard to support model routing for streamed requests?