Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added OpenAI Manifold pipeline. #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

healdgar
Copy link

@healdgar healdgar commented Feb 2, 2025

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. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant