mirror of
https://github.com/open-webui/pipelines.git
synced 2026-07-19 14:43:34 -04:00
[PR #408] [CLOSED] Added OpenAI Manifold pipeline. #409
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/pipelines/pull/408
Author: @healdgar
Created: 2/1/2025
Status: ❌ Closed
Base:
main← Head:add-openai-manifold-update📝 Commits (1)
ff0dcb9Added OpenAI Manifold pipeline.📊 Changes
1 file changed (+113 additions, -0 deletions)
View changed files
➕
pipelines/openai_manifold_pipeline.py(+113 -0)📄 Description
This modification of the Ollama manifold pipeline introduces an OpenAI-based manifold pipeline for handling chat completions using OpenAI's API. The pipeline:
Registers itself as a manifold with a unique identifier (openai_manifold).
Dynamically fetches available OpenAI models from the API on startup and when configuration changes.
Implements a pipe() function that:
Accepts user messages and constructs a valid OpenAI API request.
Removes unsupported fields (e.g., user metadata) before making API calls.
Supports both streaming and non-streaming responses.
Uses requests to interact with OpenAI’s API for chat completions.
This adaptation enables seamless integration of OpenAI’s models into the manifold framework while maintaining compatibility with existing configurations. 🚀
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.