OpenaiEx.Beta.Agents.Sessions (openai_ex v0.10.0)

Copy Markdown View Source

This module provides an implementation of the OpenAI agent sessions API (beta). The API reference can be found at https://developers.openai.com/api/reference/agents/sessions.

Summary

Functions

create(openai, params)

create(openai, params, list)

create!(openai, params)

create!(openai, params, list)

Creates a new agent session. Pass stream: true to receive the session's events as a stream.

delete(openai, session_id)

delete!(openai, session_id)

list(openai, params \\ %{})

list!(openai, params \\ %{})

new(args)

Creates a new agent session request with the given arguments.

Example usage:

iex> OpenaiEx.Beta.Agents.Sessions.new(environment: %{type: "none"}, agent_id: "agent_123", input: "Hello")
%{agent_id: "agent_123", environment: %{type: "none"}, input: "Hello"}

retrieve(openai, session_id)

retrieve!(openai, session_id)

update(openai, session_id, params)

update!(openai, session_id, params)