Documentation ¶
Index ¶
- type AliyunBailianModelMeta
- type AliyunBailianModelMetaPublic
- type AliyunBailianModelMetaSecret
- type AliyunBailianProviderMeta
- type AliyunBailianProviderMetaPublic
- type AliyunBailianProviderMetaSecret
- type AliyunDashScopeModelMeta
- type AliyunDashScopeModelMetaPublic
- type AliyunDashScopeModelMetaSecret
- type AliyunDashScopeRequestType
- type AliyunDashScopeResponseType
- type AuditMetadata
- type AuditMetadataPublic
- type AuditMetadataSecret
- type ClientMeta
- type ClientMetaPublic
- type ClientMetaSecret
- type Config
- type Metadata
- func (m *Metadata) FromProtobuf(pb *pb.Metadata)
- func (m *Metadata) GetPublicValueByKey(key string, ignoreCaseOpt ...bool) (string, bool)
- func (m *Metadata) GetSecretValueByKey(key string, ignoreCaseOpt ...bool) (string, bool)
- func (m *Metadata) GetValueByKey(key string, optionalCfg ...Config) (string, bool)
- func (m *Metadata) MergeMap() map[string]string
- func (m *Metadata) MustGetValueByKey(key string, optionalCfg ...Config) string
- func (m *Metadata) Scan(src any) error
- func (m *Metadata) ToClientMeta() (*ClientMeta, error)
- func (m *Metadata) ToJson() (string, error)
- func (m *Metadata) ToModelProviderMeta() (*ModelProviderMeta, error)
- func (m *Metadata) ToProtobuf() *pb.Metadata
- func (m Metadata) Value() (driver.Value, error)
- type ModelProviderMeta
- type ModelProviderMetaPublic
- type ModelProviderMetaSecret
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AliyunBailianModelMeta ¶
type AliyunBailianModelMeta struct { Public AliyunBailianModelMetaPublic `json:"public,omitempty"` Secret AliyunBailianModelMetaSecret `json:"secret,omitempty"` }
type AliyunBailianModelMetaPublic ¶
type AliyunBailianModelMetaPublic struct{}
type AliyunBailianModelMetaSecret ¶
type AliyunBailianModelMetaSecret struct {
AppId string `json:"appId,omitempty"`
}
type AliyunBailianProviderMeta ¶
type AliyunBailianProviderMeta struct { Public AliyunBailianProviderMetaPublic `json:"public,omitempty"` Secret AliyunBailianProviderMetaSecret `json:"secret,omitempty"` }
type AliyunBailianProviderMetaPublic ¶
type AliyunBailianProviderMetaPublic struct{}
type AliyunDashScopeModelMeta ¶
type AliyunDashScopeModelMeta struct { Public AliyunDashScopeModelMetaPublic `json:"public,omitempty"` Secret AliyunDashScopeModelMetaSecret `json:"secret,omitempty"` }
type AliyunDashScopeModelMetaPublic ¶
type AliyunDashScopeModelMetaPublic struct { ModelName string `json:"model_name,omitempty"` RequestType AliyunDashScopeRequestType `json:"request_type,omitempty"` ResponseType AliyunDashScopeResponseType `json:"response_type,omitempty"` CustomURL string `json:"custom_url"` // e.g., https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions }
type AliyunDashScopeModelMetaSecret ¶
type AliyunDashScopeModelMetaSecret struct { }
type AliyunDashScopeRequestType ¶
type AliyunDashScopeRequestType string
const ( AliyunDashScopeRequestTypeOpenAI AliyunDashScopeRequestType = "openai" AliyunDashScopeRequestTypeDs AliyunDashScopeRequestType = "ds" )
func (AliyunDashScopeRequestType) String ¶
func (t AliyunDashScopeRequestType) String() string
func (AliyunDashScopeRequestType) Valid ¶
func (t AliyunDashScopeRequestType) Valid() (bool, error)
type AliyunDashScopeResponseType ¶
type AliyunDashScopeResponseType string
const ( AliyunDashScopeResponseTypeOpenAI AliyunDashScopeResponseType = "openai" AliyunDashScopeResponseTypeDs AliyunDashScopeResponseType = "ds" )
func (AliyunDashScopeResponseType) String ¶
func (t AliyunDashScopeResponseType) String() string
func (AliyunDashScopeResponseType) Valid ¶
func (t AliyunDashScopeResponseType) Valid() (bool, error)
type AuditMetadata ¶
type AuditMetadata struct { Public AuditMetadataPublic `json:"public,omitempty"` Secret AuditMetadataSecret `json:"secret,omitempty"` }
type AuditMetadataPublic ¶
type AuditMetadataPublic struct { FilterName string `json:"filter.name,omitempty"` FilterError string `json:"filter.error,omitempty"` RequestContentType string `json:"request.content_type,omitempty"` ActualRequestURL string `json:"actual.request.url,omitempty"` RequestFunctionCallName string `json:"request.function_call.name,omitempty"` RequestHeader string `json:"request.headers,omitempty"` ActualRequestHeader string `json:"actual.request.headers,omitempty"` ResponseContentType string `json:"response.content_type,omitempty"` ResponseFunctionCallName string `json:"response.function_call.name,omitempty"` ResponseStreamDoneAt string `json:"response.stream.done_at,omitempty"` ResponseHeader string `json:"response.header,omitempty"` TimeCost string `json:"time_cost,omitempty"` AudioFileName string `json:"audio.file.name,omitempty"` AudioFileSize string `json:"audio.file.size,omitempty"` AudioFileHeaders string `json:"audio.file.headers,omitempty"` ImageQuality string `json:"image.quality,omitempty"` ImageSize string `json:"image.size,omitempty"` ImageStyle string `json:"image.style,omitempty"` }
type AuditMetadataSecret ¶
type AuditMetadataSecret struct { IdentityPhoneNumber string `json:"identity.phone_number,omitempty"` IdentityJobNumber string `json:"identity.job_number,omitempty"` DingtalkStaffId string `json:"dingtalk.staff_id,omitempty"` DingtalkChatType string `json:"dingtalk.chat_type,omitempty"` DingtalkChatTitle string `json:"dingtalk.chat_title,omitempty"` DingtalkChatId string `json:"dingtalk.chat_id,omitempty"` }
type ClientMeta ¶
type ClientMeta struct { Public ClientMetaPublic `json:"public,omitempty"` Secret ClientMetaSecret `json:"secret,omitempty"` }
type ClientMetaPublic ¶
type ClientMetaPublic struct { DefaultModelIdOfTextGeneration string `json:"default_model_id_of_text_generation,omitempty"` DefaultModelIdOfImage string `json:"default_model_id_of_image,omitempty"` DefaultModelIdOfAudio string `json:"default_model_id_of_audio,omitempty"` DefaultModelIdOfEmbedding string `json:"default_model_id_of_embedding,omitempty"` DefaultModelIdOfTextModeration string `json:"default_model_id_of_text_moderation,omitempty"` DefaultModelIdOfMultimodal string `json:"default_model_id_of_multimodal,omitempty"` DefaultModelIdOfAssistant string `json:"default_model_id_of_assistant,omitempty"` }
func (*ClientMetaPublic) GetDefaultModelIdByModelType ¶
func (p *ClientMetaPublic) GetDefaultModelIdByModelType(modelType modelpb.ModelType) (string, bool)
type ClientMetaSecret ¶
type ClientMetaSecret struct { }
type Metadata ¶
type Metadata struct { Public map[string]string `json:"public,omitempty"` Secret map[string]string `json:"secret,omitempty"` }
func FromProtobuf ¶
func (*Metadata) FromProtobuf ¶
func (*Metadata) GetPublicValueByKey ¶
func (*Metadata) GetSecretValueByKey ¶
func (*Metadata) GetValueByKey ¶
func (*Metadata) MustGetValueByKey ¶
func (*Metadata) ToClientMeta ¶
func (m *Metadata) ToClientMeta() (*ClientMeta, error)
func (*Metadata) ToModelProviderMeta ¶
func (m *Metadata) ToModelProviderMeta() (*ModelProviderMeta, error)
func (*Metadata) ToProtobuf ¶
type ModelProviderMeta ¶
type ModelProviderMeta struct { Public ModelProviderMetaPublic `json:"public,omitempty"` Secret ModelProviderMetaSecret `json:"secret,omitempty"` }
type ModelProviderMetaPublic ¶
type ModelProviderMetaSecret ¶
type ModelProviderMetaSecret struct {
AnotherAPIKey string `json:"anotherApiKey,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.