Documentation
¶
Index ¶
- func ConvertParametersToSchema(params any) (any, error)
- type Client
- func (c *Client) CreateBatchEmbedding(ctx context.Context, texts []string) (*base.BatchEmbeddingResult, error)
- func (c *Client) CreateChatCompletionStream(ctx context.Context, messages []chat.Message, requestTools []tools.Tool) (chat.MessageStream, error)
- func (c *Client) CreateEmbedding(ctx context.Context, text string) (*base.EmbeddingResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertParametersToSchema ¶ added in v1.7.0
ConvertParametersToSchema converts parameters to DMR Schema format
Types ¶
type Client ¶
Client represents an DMR client wrapper It implements the provider.Provider interface
func (*Client) CreateBatchEmbedding ¶ added in v1.9.16
func (c *Client) CreateBatchEmbedding(ctx context.Context, texts []string) (*base.BatchEmbeddingResult, error)
CreateBatchEmbedding generates embedding vectors for multiple texts with usage tracking.
func (*Client) CreateChatCompletionStream ¶
func (c *Client) CreateChatCompletionStream(ctx context.Context, messages []chat.Message, requestTools []tools.Tool) (chat.MessageStream, error)
CreateChatCompletionStream creates a streaming chat completion request It returns a stream that can be iterated over to get completion chunks
func (*Client) CreateEmbedding ¶ added in v1.9.16
CreateEmbedding generates an embedding vector for the given text with usage tracking.
Click to show internal directories.
Click to hide internal directories.