[PR #1331] [CLOSED] Add OpenAI compatible API chat completions #10552

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/1331
Author: @vaayne
Created: 11/30/2023
Status: Closed

Base: mainHead: openai-api


📝 Commits (2)

  • f8e88bd Add OpenAI compatible API chat completions
  • a24141b add API doc

📊 Changes

3 files changed (+290 additions, -40 deletions)

View changed files

📝 api/types.go (+116 -0)
📝 docs/api.md (+67 -0)
📝 server/routes.go (+107 -40)

📄 Description

fix for issue https://github.com/jmorganca/ollama/issues/305

API example

image

Stream Response

image

🔄 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/1331 **Author:** [@vaayne](https://github.com/vaayne) **Created:** 11/30/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `openai-api` --- ### 📝 Commits (2) - [`f8e88bd`](https://github.com/ollama/ollama/commit/f8e88bdeec11820edf350c071bfa409ae236d641) Add OpenAI compatible API chat completions - [`a24141b`](https://github.com/ollama/ollama/commit/a24141bc447cfb775e3e4346e2e24cf8fadc6163) add API doc ### 📊 Changes **3 files changed** (+290 additions, -40 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+116 -0) 📝 `docs/api.md` (+67 -0) 📝 `server/routes.go` (+107 -40) </details> ### 📄 Description fix for issue https://github.com/jmorganca/ollama/issues/305 ## API example <img width="1254" alt="image" src="https://github.com/jmorganca/ollama/assets/10231735/6e9a73a7-40f2-4526-9897-ed4b76a4e615"> ## Stream Response <img width="1246" alt="image" src="https://github.com/jmorganca/ollama/assets/10231735/1c03fb26-8448-444c-a989-e0b70543a4a1"> --- <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:03:03 -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#10552