[PR #5752] [MERGED] OpenAI: Function Based Testing #11911

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/5752
Author: @royjhan
Created: 7/17/2024
Status: Merged
Merged: 7/19/2024
Merged by: @royjhan

Base: mainHead: royh-openai-testing


📝 Commits (3)

📊 Changes

2 files changed (+266 additions, -170 deletions)

View changed files

📝 openai/openai.go (+1 -0)
📝 openai/openai_test.go (+265 -170)

📄 Description

Distinguish tests by function, testing requests and error forwarding

captureRequestMiddleware catches the request after it has been converted by the functionality middleware, before hitting a mock endpoint returning 200

ResponseRecorder catches any errors that are returned in the response body immediately by the middleware before reaching the endpoint


🔄 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/5752 **Author:** [@royjhan](https://github.com/royjhan) **Created:** 7/17/2024 **Status:** ✅ Merged **Merged:** 7/19/2024 **Merged by:** [@royjhan](https://github.com/royjhan) **Base:** `main` ← **Head:** `royh-openai-testing` --- ### 📝 Commits (3) - [`d000d59`](https://github.com/ollama/ollama/commit/d000d596bc2fec73eda08f1b70d401519332b945) distinguish error forwarding - [`68769ed`](https://github.com/ollama/ollama/commit/68769ed7e215294d12a5ae34f0e406952f7e3f48) more coverage - [`2233614`](https://github.com/ollama/ollama/commit/22336143fedfae15694563cad98e5028a7f5b325) rm comment ### 📊 Changes **2 files changed** (+266 additions, -170 deletions) <details> <summary>View changed files</summary> 📝 `openai/openai.go` (+1 -0) 📝 `openai/openai_test.go` (+265 -170) </details> ### 📄 Description Distinguish tests by function, testing requests and error forwarding captureRequestMiddleware catches the request after it has been converted by the functionality middleware, before hitting a mock endpoint returning 200 ResponseRecorder catches any errors that are returned in the response body immediately by the middleware before reaching the endpoint --- <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:42:25 -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#11911