|
@@ -6,7 +6,7 @@ import (
|
|
|
|
|
|
type BaseRequestInvokeModel struct {
|
|
type BaseRequestInvokeModel struct {
|
|
Provider string `json:"provider" validate:"required"`
|
|
Provider string `json:"provider" validate:"required"`
|
|
- ModelType model_entities.ModelType `json:"model_type" mapstructure:"model_type" validate:"required,model_type"`
|
|
|
|
|
|
+ ModelType model_entities.ModelType `json:"model_type" validate:"required,model_type"`
|
|
Model string `json:"model" validate:"required"`
|
|
Model string `json:"model" validate:"required"`
|
|
Credentials map[string]any `json:"credentials" validate:"omitempty,dive,is_basic_type"`
|
|
Credentials map[string]any `json:"credentials" validate:"omitempty,dive,is_basic_type"`
|
|
}
|
|
}
|
|
@@ -23,11 +23,11 @@ func (r *BaseRequestInvokeModel) ToCallerArguments() map[string]any {
|
|
type RequestInvokeLLM struct {
|
|
type RequestInvokeLLM struct {
|
|
BaseRequestInvokeModel
|
|
BaseRequestInvokeModel
|
|
|
|
|
|
- ModelParameters map[string]any `json:"model_parameters" mapstructure:"model_parameters" validate:"omitempty,dive,is_basic_type"`
|
|
|
|
- PromptMessages []model_entities.PromptMessage `json:"prompt_messages" mapstructure:"prompt_messages" validate:"omitempty,dive"`
|
|
|
|
|
|
+ ModelParameters map[string]any `json:"model_parameters" validate:"omitempty,dive,is_basic_type"`
|
|
|
|
+ PromptMessages []model_entities.PromptMessage `json:"prompt_messages" validate:"omitempty,dive"`
|
|
Tools []model_entities.PromptMessageTool `json:"tools" validate:"omitempty,dive"`
|
|
Tools []model_entities.PromptMessageTool `json:"tools" validate:"omitempty,dive"`
|
|
Stop []string `json:"stop" validate:"omitempty"`
|
|
Stop []string `json:"stop" validate:"omitempty"`
|
|
- Stream bool `json:"stream" mapstructure:"stream"`
|
|
|
|
|
|
+ Stream bool `json:"stream" `
|
|
}
|
|
}
|
|
|
|
|
|
type RequestInvokeTextEmbedding struct {
|
|
type RequestInvokeTextEmbedding struct {
|
|
@@ -41,14 +41,14 @@ type RequestInvokeRerank struct {
|
|
|
|
|
|
Query string `json:"query" validate:"required"`
|
|
Query string `json:"query" validate:"required"`
|
|
Docs []string `json:"docs" validate:"required,dive"`
|
|
Docs []string `json:"docs" validate:"required,dive"`
|
|
- ScoreThreshold float64 `json:"score_threshold" mapstructure:"score_threshold"`
|
|
|
|
- TopN int `json:"top_n" mapstructure:"top_n"`
|
|
|
|
|
|
+ ScoreThreshold float64 `json:"score_threshold" `
|
|
|
|
+ TopN int `json:"top_n" `
|
|
}
|
|
}
|
|
|
|
|
|
type RequestInvokeTTS struct {
|
|
type RequestInvokeTTS struct {
|
|
BaseRequestInvokeModel
|
|
BaseRequestInvokeModel
|
|
|
|
|
|
- ContentText string `json:"content_text" mapstructure:"content_text" validate:"required"`
|
|
|
|
|
|
+ ContentText string `json:"content_text" validate:"required"`
|
|
Voice string `json:"voice" validate:"required"`
|
|
Voice string `json:"voice" validate:"required"`
|
|
}
|
|
}
|
|
|
|
|