Documentation
¶
Overview ¶
mistral implements an API client for mistral (https://docs.mistral.ai/api/)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Callback ¶ added in v1.0.4
type Callback func(schema.MessageChoice)
Callback when new stream data is received
type Client ¶
type Client struct {
*client.Client
}
func (*Client) Chat ¶
func (c *Client) Chat(ctx context.Context, messages []*schema.Message, opts ...Opt) ([]*schema.Content, error)
Chat creates a model response for the given chat conversation.
func (*Client) CreateEmbedding ¶
CreateEmbedding creates an embedding from a string or array of strings
func (*Client) ListModels ¶
ListModels returns all the models
type Opt ¶ added in v1.0.4
type Opt func(*options) error
Opt is a function which can be used to set options on a request
func OptEncodingFormat ¶ added in v1.0.4
Set the embedding encoding format
func OptSafePrompt ¶ added in v1.0.4
func OptSafePrompt() Opt
Inject a safety prompt before all conversations.
func OptSeed ¶ added in v1.0.4
The seed to use for random sampling. If set, different calls will generate deterministic results.
func OptTemperature ¶ added in v1.0.4
Amount of randomness injected into the response.
Click to show internal directories.
Click to hide internal directories.