Documentation
¶
Index ¶
- func GetDefaultModelRequestsPattern() []commons.ModelRequest
- func GetFastModelRequestsPattern() []commons.ModelRequest
- type Mistral
- func (mc *Mistral) Ask(ctx context.Context, question string, model string) (string, error)
- func (mc *Mistral) AskWithContext(ctx context.Context, question string, model string, formattedContext string) (ResponseWithContext, error)
- func (mc *Mistral) GetFormattedContext(ctx context.Context, question string) ([]models.QAPair, error)
- type ModelClient
- type ResponseWithContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefaultModelRequestsPattern ¶
func GetDefaultModelRequestsPattern() []commons.ModelRequest
func GetFastModelRequestsPattern ¶
func GetFastModelRequestsPattern() []commons.ModelRequest
Types ¶
type Mistral ¶
type Mistral struct {
*mistral.ClientWithResponses
}
func (*Mistral) AskWithContext ¶
type ModelClient ¶
type ModelClient interface {
// Ask отправляет запрос к модели
Ask(ctx context.Context, question string, model string) (string, error)
// AskWithContext отправляет запрос к модели с использованием контекста
AskWithContext(ctx context.Context, question string, model string, formattedContext string) (ResponseWithContext, error)
// GetFormattedContext -
GetFormattedContext(ctx context.Context, question string) ([]models.QAPair, error)
}
func NewMistralClient ¶
func NewMistralClient() (ModelClient, error)
type ResponseWithContext ¶
Click to show internal directories.
Click to hide internal directories.