Component Libraries •
Project Templates
Docs •
Install •
Tutorials •
Developer Guides •
Contribute •
Blog •
Discord
Xircuits Library for OpenAI: Seamlessly integrate AI to build and deploy intelligent solutions effortlessly.
This library connects OpenAI's models with Xircuits, making it easy to use features like text generation, image creation, and AI conversations.
Before you begin, you will need the following:
- Python3.9+.
- Xircuits.
Sets the API key and organization for OpenAI, enabling access to its models.
Creates text completions using an OpenAI model, with adjustable parameters.
Conducts conversations with OpenAI models, maintaining conversation history.
Fetches a list of available OpenAI models for use in workflows.
Retrieves detailed information about a specific OpenAI model.
Edits input text based on specific instructions provided.
Generates images from text prompts using OpenAI's image models.
Creates alternate versions of an input image using OpenAI's variation tools.
Modifies an input image based on a text prompt or a mask.
We have provided an example workflow to help you get started with the OpenAI component library. Give it a try and see how you can create custom OpenAI components for your applications.
This example authorizes OpenAI access using an API key and retrieves the list of available models. The models are then printed to the console.
To use this component library, ensure that you have an existing Xircuits setup. You can then install the OpenAI library using the component library interface, or through the CLI using:
xircuits install openai
You can also do it manually by cloning and installing it:
# base Xircuits directory
git clone https://github.com/XpressAI/xai-openai xai_components/xai_openai
pip install -r xai_components/xai_openai/requirements.txt