View Source OpenaiEx.Beta.Threads.Messages (openai_ex v0.8.4)

This module provides an implementation of the OpenAI messages API. The API reference can be found at https://platform.openai.com/docs/api-reference/messages.

Summary

Functions

Calls the message create endpoint.

Creates a new message request with the given arguments.

Lists the messages that belong to the specified thread.

Calls the message retrieve endpoint.

Calls the message update endpoint.

Functions

Link to this function

create(openai, thread_id, params)

View Source
Link to this function

create!(openai, thread_id, params)

View Source

Calls the message create endpoint.

Arguments

  • openai: The OpenAI configuration.
  • params: A map containing the fields of the message create request.

Returns

A map containing the fields of the created message object.

https://platform.openai.com/docs/api-reference/messages/createMessage

Link to this function

delete(openai, thread_id, message_id)

View Source
Link to this function

delete!(openai, thread_id, message_id)

View Source
Link to this function

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

View Source
Link to this function

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

View Source

Creates a new message request with the given arguments.

Arguments

  • args: A list of key-value pairs, or a map, representing the fields of the message request.

Returns

A map containing the fields of the message request.

Lists the messages that belong to the specified thread.

https://platform.openai.com/docs/api-reference/messages/listMessages

Link to this function

retrieve!(openai, params)

View Source

Calls the message retrieve endpoint.

Arguments

  • openai: The OpenAI configuration.
  • params: A map containing the fields of the message retrieve request.

Returns

A map containing the fields of the specified message object.

https://platform.openai.com/docs/api-reference/messages/getMessage

Calls the message update endpoint.

Arguments

  • openai: The OpenAI configuration.
  • params: A map containing the fields of the message update request.

Returns

A map containing the fields of the message update response.

https://platform.openai.com/docs/api-reference/messages/modifyMessage