Tutorial
Tutorials for Julep Open Responses API using OpenAI SDKs
Overview
The Julep’s Open Responses API provides a straightforward way to interact with language models for quick, one-off interactions. This tutorial will guide you through leveraging the SDK to create and retrieve responses.
- The Open Responses API requires self-hosting. See the installation guide below.
- Being in Alpha, the API is subject to change. Check back frequently for updates.
- For more context, see the OpenAI Responses API documentation.
API Key Configuration
RESPONSE_API_KEY
is the API key that you set in the.env
file.
Model Selection
- While using models other than OpenAI, one might need to add the
provider/
prefix to the model name. - For supported providers, see the LiteLLM Providers documentation.
Environment Setup
- Add the relevant provider keys to the
.env
file to use their respective models.
Creating a Response
To generate a response using the OpenAI SDKs, you’ll use the create
method. Here’s how to do it with OpenAI’s SDKs:
Follow the example below to see a sample response from the Responses API.
Using Function Calling Tools
Follow the example below to see a sample response from the Responses API.
- Please note that the model will generate a response with the Function tool call with the required arguments which can be found in the
Response
object. As a user, you need to manually run the custom function tool call with the required arguments to get the output and then feed it back to the model along with the original responses and the tool call to get the final response. - To learn more about Function Calling, please refer to the OpenAI Function Calling section.
Using Web Search Tool
Follow the example below to see a sample response from the Responses API.
Currently our Responses API only supports the following functionality:
- Text input
- Image input
- Function calling
- Reasoning
- Web search
We are working on adding support for more functionality in the future.
Retrieving a Response
Follow the example below to see a sample response from the Responses API.
Check out the API reference or SDK reference (Python or JavaScript) for more details on different operations you can perform with the Responses API.
Next Steps
- Return to the Quickstart guide - To get started with the Julep Open Responses API.
- Learn more about Julep - To learn more about Julep.
- Learn more about the Open Responses API concepts - To learn more about the concepts of the Julep Open Responses API.
- Learn more about the Open Responses API Roadmap - To learn more about the roadmap of the Julep Open Responses API.
- GitHub - To contribute to the project