gateway icon indicating copy to clipboard operation
gateway copied to clipboard

Translation of Stop Reason for Anthropic -> OpenAI

Open functorism opened this issue 7 months ago • 1 comments

https://github.com/Portkey-AI/gateway/blob/fe0899bbf1a0f65f8f751aca8fca1b0a4409acb4/src/providers/anthropic/chatComplete.ts#L397

OpenAI SDKs with strict response validation (such as https://docs.rs/async-openai/latest/async_openai/) fails due to lack of mapping of Anthropic stop reason to a valid OpenAI stop reason.

functorism avatar Jul 15 '24 16:07 functorism