Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add eos finish reason that maps to Stop for llama models #267

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kcrandall
Copy link

@kcrandall kcrandall commented Oct 24, 2024

I got this error below when using SemanticKernel with Together.ai llama as an open ai compatible endpoint. It seems like they return eos instead of the normal stop string thowing an exception just before completion.

System.ArgumentOutOfRangeException: Unknown ChatFinishReason value. (Parameter 'value')\nActual value was eos.\n at OpenAI.Chat.ChatFinishReasonExtensions.ToChatFinishReason(String value)\n at OpenAI.Chat.InternalCreateChatCompletionStreamResponseChoice.DeserializeInternalCreateChatCompletionStreamResponseChoice(JsonElement element, ModelReaderWriterOptions options)\n at OpenAI.Chat.StreamingChatCompletionUpdate.DeserializeStreamingChatCompletionUpdate(JsonElement element, ModelReaderWriterOptions options)\n at

@sergeyleliukh
Copy link

the same problem, please add eos finish reason

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants