[PR #2376] [MERGED] OpenAI API compatibility #42118

Closed
opened 2026-04-24 21:54:36 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2376
Author: @jmorganca
Created: 2/6/2024
Status: Merged
Merged: 2/7/2024
Merged by: @jmorganca

Base: mainHead: openai


📝 Commits (1)

  • 3e4180d Initial OpenAI /v1/chat/completions API compatibility

📊 Changes

3 files changed (+466 additions, -0 deletions)

View changed files

docs/openai.md (+140 -0)
openai/openai.go (+322 -0)
📝 server/routes.go (+4 -0)

📄 Description

This adds experimental compatibility with the OpenAI Chat Completions (i.e. /v1/chat/completions) API. Details on compatibility and supported fields are indocs/openai.md

Fixes #305


🔄 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/2376 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 2/6/2024 **Status:** ✅ Merged **Merged:** 2/7/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `openai` --- ### 📝 Commits (1) - [`3e4180d`](https://github.com/ollama/ollama/commit/3e4180de25723c158737701d6c1502cd20063261) Initial OpenAI `/v1/chat/completions` API compatibility ### 📊 Changes **3 files changed** (+466 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `docs/openai.md` (+140 -0) ➕ `openai/openai.go` (+322 -0) 📝 `server/routes.go` (+4 -0) </details> ### 📄 Description This adds experimental compatibility with the OpenAI Chat Completions (i.e. `/v1/chat/completions`) API. Details on compatibility and supported fields are in`docs/openai.md` Fixes #305 --- <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-24 21:54:36 -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#42118