mistral

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

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 Client

type Client struct {
	*client.Client
}

func New

func New(ApiKey string, opts ...client.ClientOpt) (*Client, error)

Create a new client

func (*Client) Chat

func (c *Client) Chat(messages []schema.Message) (schema.Message, error)

Chat creates a model response for the given chat conversation.

func (*Client) CreateEmbedding

func (c *Client) CreateEmbedding(content any) (Embeddings, error)

CreateEmbedding creates an embedding from a string or array of strings

func (*Client) ListModels

func (c *Client) ListModels() ([]Model, error)

ListModels returns all the models

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL