OpenApiTypesense.Conversations (OpenApiTypesense v0.6.5)

View Source

Provides API endpoints related to conversations

Summary

Functions

create_conversation_model(body)

@spec create_conversation_model(map()) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

post /conversations/models

Create a Conversation Model

create_conversation_model(body, opts)

@spec create_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  map() | keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • create_conversation_model(body, opts)
  • create_conversation_model(%{api_key: xyz, host: ...}, body)
  • create_conversation_model(Connection.new(), body)

create_conversation_model(conn, body, opts)

@spec create_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  map(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • create_conversation_model(%{api_key: xyz, host: ...}, body, opts)
  • create_conversation_model(Connection.new(), body, opts)

delete_conversation_model(modelId)

@spec delete_conversation_model(String.t()) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Delete a conversation model

Delete a conversation model

delete_conversation_model(modelId, opts)

Either one of:

  • delete_conversation_model(modelId, opts)
  • delete_conversation_model(%{api_key: xyz, host: ...}, modelId)
  • delete_conversation_model(Connection.new(), modelId)

delete_conversation_model(conn, modelId, opts)

@spec delete_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  String.t() | keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}
@spec delete_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • delete_conversation_model(%{api_key: xyz, host: ...}, modelId, opts)
  • delete_conversation_model(Connection.new(), modelId, opts)

retrieve_all_conversation_models()

@spec retrieve_all_conversation_models() ::
  {:ok, [OpenApiTypesense.ConversationModelSchema.t()]}
  | {:error, OpenApiTypesense.ApiResponse.t()}

List all conversation models

Retrieve all conversation models

retrieve_all_conversation_models(opts)

@spec retrieve_all_conversation_models(
  map()
  | OpenApiTypesense.Connection.t()
  | keyword()
) ::
  {:ok, [OpenApiTypesense.ConversationModelSchema.t()]}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • retrieve_all_conversation_models(opts)
  • retrieve_all_conversation_models(%{api_key: xyz, host: ...})
  • retrieve_all_conversation_models(Connection.new())

retrieve_all_conversation_models(conn, opts)

@spec retrieve_all_conversation_models(
  map() | OpenApiTypesense.Connection.t(),
  keyword()
) ::
  {:ok, [OpenApiTypesense.ConversationModelSchema.t()]}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • retrieve_all_conversation_models(%{api_key: xyz, host: ...}, opts)
  • retrieve_all_conversation_models(Connection.new(), opts)

retrieve_conversation_model(modelId)

@spec retrieve_conversation_model(String.t()) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Retrieve a conversation model

Retrieve a conversation model

retrieve_conversation_model(modelId, opts)

@spec retrieve_conversation_model(
  map() | OpenApiTypesense.Connection.t() | String.t(),
  String.t() | keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • retrieve_conversation_model(modelId, opts)
  • retrieve_conversation_model(%{api_key: xyz, host: ...}, modelId)
  • retrieve_conversation_model(Connection.new(), modelId)

retrieve_conversation_model(conn, modelId, opts)

@spec retrieve_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • retrieve_conversation_model(%{api_key: xyz, host: ...}, modelId, opts)
  • retrieve_conversation_model(Connection.new(), modelId, opts)

update_conversation_model(modelId, body)

@spec update_conversation_model(String.t(), map()) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Update a conversation model

Update a conversation model

update_conversation_model(modelId, body, opts)

@spec update_conversation_model(
  map() | OpenApiTypesense.Connection.t() | String.t(),
  String.t() | map(),
  map() | keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • update_conversation_model(modelId, body, opts)
  • update_conversation_model(%{api_key: xyz, host: ...}, modelId, body)
  • update_conversation_model(Connection.new(), modelId, body)

update_conversation_model(conn, modelId, body, opts)

@spec update_conversation_model(
  map() | OpenApiTypesense.Connection.t(),
  String.t(),
  map(),
  keyword()
) ::
  {:ok, OpenApiTypesense.ConversationModelSchema.t()}
  | {:error, OpenApiTypesense.ApiResponse.t()}

Either one of:

  • update_conversation_model(%{api_key: xyz, host: ...}, modelId, body, opts)
  • update_conversation_model(Connection.new(), modelId, body, opts)