[PR #4368] [MERGED] Fix OpenAI finish_reason values when empty #11470

Closed
opened 2026-04-12 23:30:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4368
Author: @jmorganca
Created: 5/11/2024
Status: Merged
Merged: 5/11/2024
Merged by: @jmorganca

Base: mainHead: jmorganca/fr


📝 Commits (4)

  • abdf8e6 openai: dont render empty finish_reason
  • 2827f8b openai: dont render empty finish_reason
  • 2f4b6d9 finish_reason should be null if empty
  • 7a1f75e simpler approach

📊 Changes

1 file changed (+18 additions, -10 deletions)

View changed files

📝 openai/openai.go (+18 -10)

📄 Description

Fixes https://github.com/ollama/ollama/issues/4357


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/4368 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 5/11/2024 **Status:** ✅ Merged **Merged:** 5/11/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/fr` --- ### 📝 Commits (4) - [`abdf8e6`](https://github.com/ollama/ollama/commit/abdf8e687e3dfb352132e924e37c11674b6dd426) openai: dont render empty `finish_reason` - [`2827f8b`](https://github.com/ollama/ollama/commit/2827f8bcfa689ba840f10d6593120c05caf83c6a) openai: dont render empty `finish_reason` - [`2f4b6d9`](https://github.com/ollama/ollama/commit/2f4b6d96368721e5eaec9c905f60d8cfbd18211d) `finish_reason` should be null if empty - [`7a1f75e`](https://github.com/ollama/ollama/commit/7a1f75edf1cecad25fc62385784195d56168ada1) simpler approach ### 📊 Changes **1 file changed** (+18 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `openai/openai.go` (+18 -10) </details> ### 📄 Description Fixes https://github.com/ollama/ollama/issues/4357 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-12 23:30:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#11470