View Source OpenaiEx.Beta.Assistants (openai_ex v0.6.3)
This module provides an implementation of the OpenAI assistants API. The API reference can be found at https://platform.openai.com/docs/api-reference/assistants.
Summary
Functions
Calls the assistant 'create' endpoint.
Calls the assistant delete endpoint.
Returns a list of assistant objects.
Creates a new assistants request with the given arguments.
Creates a new list assistants request with the given arguments.
Calls the assistant retrieve endpoint.
Calls the assistant update endpoint.
Functions
Calls the assistant 'create' endpoint.
Arguments
openai
: The OpenAI configuration.assistant
: The assistant request, as a map with keys corresponding to the API fields.
Returns
A map containing the API response.
See https://platform.openai.com/docs/api-reference/assistants/createAssistant for more information.
Calls the assistant delete endpoint.
Arguments
openai
: The OpenAI configuration.assistant_id
: The ID of the file to delete.
Returns
A map containing the fields of the assistant delete response.
https://platform.openai.com/docs/api-reference/assistants/deleteAssistant
Returns a list of assistant objects.
https://platform.openai.com/docs/api-reference/assistants/listAssistants
Creates a new assistants request with the given arguments.
Arguments
args
: A list of key-value pairs, or a map, representing the fields of the assistant request.
Returns
A map containing the fields of the assistant request.
The :model
field is required.
Example usage:
iex> _request = OpenaiEx.Beta.Assistants.new(model: "gpt-4-turbo")
%{model: "gpt-4-turbo"}
Creates a new list assistants request with the given arguments.
Arguments
args
: A list of key-value pairs, or a map, representing the fields of the list assistants request.
Returns
A map containing the fields of the list assistants request.
Calls the assistant retrieve endpoint.
Arguments
openai
: The OpenAI configuration.assistant_id
: The ID of the assistant to retrieve.
Returns
A map containing the fields of the file retrieve response.
https://platform.openai.com/docs/api-reference/assistants/getAssistant
Calls the assistant update endpoint.
Arguments
openai
: The OpenAI configuration.assistant_id
: The ID of the assistant to update.assistant
: The assistant request, as a map with keys corresponding to the API fields.
Returns
A map containing the API response.
See https://platform.openai.com/docs/api-reference/assistants/modifyAssistant for more information.