struct

Crig::Providers::Cohere::Client

Inherits Crig::Client::CompletionClient < Struct < Value < Object

Constructors

from_env
Source
from_val(input : String) : self
Source
new(api_key : String, base_url : String = COHERE_API_BASE_URL)
Source

Class methods

builder
Source

Instance methods

api_key
Source
base_url
Source
build_uri(path : String) : String
Source
default_headers
Source
embedding_model(model : String, input_type : String)
Source
embedding_model_with_ndims(model : String, input_type : String, ndims : Int32)
Source
embeddings(type : D.class, model : String, input_type : String) : Crig::Embeddings::EmptyEmbeddingsBuilder(EmbeddingModel) forall D
Source
embeddings(model : String, input_type : String) : Crig::Embeddings::EmptyEmbeddingsBuilder(EmbeddingModel)
Source
embeddings_with_ndims(type : D.class, model : String, input_type : String, ndims : Int32) : Crig::Embeddings::EmptyEmbeddingsBuilder(EmbeddingModel) forall D
Source
embeddings_with_ndims(model : String, input_type : String, ndims : Int32) : Crig::Embeddings::EmptyEmbeddingsBuilder(EmbeddingModel)
Source
post_json(path : String, body : String) : HTTP::Client::Response
Source