dto

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAIGCServiceRequest

type CreateAIGCServiceRequest struct {
	ServiceName   string `json:"service_name" validate:"required"`
	ServiceSource string `json:"service_source" validate:"required"`
	ApiFlavor     string `json:"api_flavor" validate:"required"`
	ProviderName  string `json:"provider_name" validate:"required"`
	Desc          string `json:"desc"`
	Method        string `json:"method"`
	Url           string `json:"url"`
	AuthType      string `json:"auth_type" validate:"required"`
	AuthKey       string `json:"auth_key"`
	ExtraHeaders  string `json:"extra_headers"`
	ExtraJsonBody string `json:"extra_json_body"`
	Properties    string `json:"properties"`
	SkipModelFlag bool   `json:"skip_model" default:"true"`
	ModelName     string `json:"model_name"`
}

type CreateAIGCServiceResponse

type CreateAIGCServiceResponse struct {
	bcode.Bcode
}

type CreateModelRequest

type CreateModelRequest struct {
	ProviderName  string `json:"provider_name"`
	ModelName     string `json:"model_name" validate:"required"`
	ServiceName   string `json:"service_name" validate:"required"`
	ServiceSource string `json:"service_source" validate:"required"`
}

type CreateModelResponse

type CreateModelResponse struct {
	bcode.Bcode
}

type CreateModelStreamRequest

type CreateModelStreamRequest struct {
	ProviderName  string `json:"provider_name"`
	ModelName     string `json:"model_name" validate:"required"`
	ServiceName   string `json:"service_name"`
	ServiceSource string `json:"service_source"`
}

type CreateServiceProviderRequest

type CreateServiceProviderRequest struct {
	ServiceName   string   `json:"service_name" validate:"required"`
	ServiceSource string   `json:"service_source" validate:"required"`
	ApiFlavor     string   `json:"api_flavor" validate:"required"`
	ProviderName  string   `json:"provider_name" validate:"required"`
	Desc          string   `json:"desc"`
	Method        string   `json:"method"`
	Url           string   `json:"url"`
	AuthType      string   `json:"auth_type"`
	AuthKey       string   `json:"auth_key"`
	Models        []string `json:"models"`
	ExtraHeaders  string   `json:"extra_headers"`
	ExtraJsonBody string   `json:"extra_json_body"`
	Properties    string   `json:"properties"`
}

type CreateServiceProviderResponse

type CreateServiceProviderResponse struct {
	bcode.Bcode
}

type DeleteAIGCServiceRequest

type DeleteAIGCServiceRequest struct{}

type DeleteAIGCServiceResponse

type DeleteAIGCServiceResponse struct{}

type DeleteModelRequest

type DeleteModelRequest struct {
	ProviderName  string `json:"provider_name"`
	ModelName     string `json:"model_name" validate:"required"`
	ServiceName   string `json:"service_name" validate:"required"`
	ServiceSource string `json:"service_source" validate:"required"`
}

type DeleteModelResponse

type DeleteModelResponse struct {
	bcode.Bcode
}

type DeleteServiceProviderRequest

type DeleteServiceProviderRequest struct {
	ProviderName string `json:"provider_name" validate:"required"`
}

type DeleteServiceProviderResponse

type DeleteServiceProviderResponse struct {
	bcode.Bcode
}

type ExportServiceRequest

type ExportServiceRequest struct {
	ServiceName  string `json:"service_name"`
	ProviderName string `json:"provider_name"`
	ModelName    string `json:"model_name"`
}

type ExportServiceResponse

type ExportServiceResponse struct {
	Version          string                          `json:"version"`
	Services         map[string]ServiceEntry         `json:"services"`
	ServiceProviders map[string]ServiceProviderEntry `json:"service_providers"`
}

type GetAIGCServiceRequest

type GetAIGCServiceRequest struct{}

type GetAIGCServiceResponse

type GetAIGCServiceResponse struct{}

type GetAIGCServicesRequest

type GetAIGCServicesRequest struct {
	ServiceName string `json:"service_name,omitempty"`
}

type GetAIGCServicesResponse

type GetAIGCServicesResponse struct {
	bcode.Bcode
	Data []Service `json:"data"`
}

type GetModelListRequest

type GetModelListRequest struct {
	ServiceSource string `form:"service_source" validate:"required"`
	Flavor        string `form:"flavor" validate:"required"`
}

type GetModelsRequest

type GetModelsRequest struct {
	ProviderName string `form:"provider_name,omitempty"`
	ModelName    string `form:"model_name,omitempty"`
	ServiceName  string `form:"service_name,omitempty"`
}

type GetModelsResponse

type GetModelsResponse struct {
	bcode.Bcode
	Data []Model `json:"data"`
}

type GetServiceProviderRequest

type GetServiceProviderRequest struct{}

type GetServiceProviderResponse

type GetServiceProviderResponse struct{}

type GetServiceProvidersRequest

type GetServiceProvidersRequest struct {
	ServiceName   string `json:"service_name,omitempty"`
	ServiceSource string `json:"service_source,omitempty"`
	ProviderName  string `json:"provider_name,omitempty"`
	ApiFlavor     string `json:"api_flavor,omitempty"`
}

type GetServiceProvidersResponse

type GetServiceProvidersResponse struct {
	bcode.Bcode
	Data []ServiceProvider `json:"data"`
}

type ImportServiceRequest

type ImportServiceRequest struct {
	Version          string                          `json:"version"`
	Services         map[string]ServiceEntry         `json:"services"`
	ServiceProviders map[string]ServiceProviderEntry `json:"service_providers"`
}

type ImportServiceResponse

type ImportServiceResponse struct {
	bcode.Bcode
}

type LocalSupportModelData

type LocalSupportModelData struct {
	OllamaId    string  `json:"id"`
	Name        string  `json:"name"`
	Avatar      string  `json:"avatar"`
	Description string  `json:"description"`
	Class       string  `json:"class"`
	Flavor      string  `json:"flavor"`
	Size        string  `json:"size"`
	ParamsSize  float32 `json:"params_size"`
}

type Model

type Model struct {
	ModelName    string    `json:"model_name"`
	ProviderName string    `json:"provider_name"`
	Status       string    `json:"status"`
	CreatedAt    time.Time `json:"created_at"`
	UpdatedAt    time.Time `json:"updated_at"`
}

type ModelStreamCancelRequest

type ModelStreamCancelRequest struct {
	ModelName string `json:"model_name" validate:"required"`
}

type ModelStreamCancelResponse

type ModelStreamCancelResponse struct {
	bcode.Bcode
}

type RecommendModelData

type RecommendModelData struct {
	Service         string   `json:"service_name"`
	Flavor          string   `json:"api_flavor"`
	Method          string   `json:"method" default:"POST"`
	Desc            string   `json:"desc"`
	Url             string   `json:"url"`
	AuthType        string   `json:"auth_type"`
	AuthApplyUrl    string   `json:"auth_apply_url"`
	AuthFields      []string `json:"auth_fields"`
	Name            string   `json:"name"`
	ServiceProvider string   `json:"service_provider_name"`
	Size            string   `json:"size"`
	IsRecommended   bool     `json:"is_recommended" default:"false"`
	Status          string   `json:"status"`
	Avatar          string   `json:"avatar"`
	CanSelect       bool     `json:"can_select" default:"false"`
	Class           string   `json:"class"`
	OllamaId        string   `json:"ollama_id"`
	ParamsSize      float32  `json:"params_size"`
}

type RecommendModelResponse

type RecommendModelResponse struct {
	bcode.Bcode
	Data map[string][]RecommendModelData `json:"data"`
}

type Service

type Service struct {
	ServiceName    string    `json:"service_name"`
	HybridPolicy   string    `json:"hybrid_policy"`
	RemoteProvider string    `json:"remote_provider"`
	LocalProvider  string    `json:"local_provider"`
	Status         int       `json:"status"`
	CreatedAt      time.Time `json:"created_at"`
	UpdatedAt      time.Time `json:"updated_at"`
}

type ServiceEntry

type ServiceEntry struct {
	ServiceProviders ServiceProviderInfo `json:"service_providers"`
	HybridPolicy     string              `json:"hybrid_policy"`
}

type ServiceProvider

type ServiceProvider struct {
	ProviderName  string    `json:"provider_name"`
	ServiceName   string    `json:"service_name"`
	ServiceSource string    `json:"service_source"`
	Desc          string    `json:"desc"`
	AuthType      string    `json:"auth_type"`
	AuthKey       string    `json:"auth_key"`
	Flavor        string    `json:"flavor"`
	Properties    string    `json:"properties"`
	Models        []string  `json:"models"`
	Status        int       `json:"status"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

type ServiceProviderEntry

type ServiceProviderEntry struct {
	ServiceName   string   `json:"service_name"`
	ServiceSource string   `json:"service_source"`
	Desc          string   `json:"desc"`
	APIFlavor     string   `json:"api_flavor"`
	Method        string   `json:"method"`
	URL           string   `json:"url"`
	AuthType      string   `json:"auth_type"`
	AuthKey       string   `json:"auth_key"`
	Models        []string `json:"models"`
}

type ServiceProviderInfo

type ServiceProviderInfo struct {
	Local  string `json:"local"`
	Remote string `json:"remote"`
}

type UpdateAIGCServiceRequest

type UpdateAIGCServiceRequest struct {
	ServiceName    string `json:"service_name" validate:"required"`
	HybridPolicy   string `json:"hybrid_policy"`
	RemoteProvider string `json:"remote_provider"`
	LocalProvider  string `json:"local_provider"`
}

type UpdateAIGCServiceResponse

type UpdateAIGCServiceResponse struct {
	bcode.Bcode
}

type UpdateServiceProviderRequest

type UpdateServiceProviderRequest struct {
	ProviderName  string   `json:"provider_name" validate:"required"`
	ServiceName   string   `json:"service_name"`
	ServiceSource string   `json:"service_source"`
	ApiFlavor     string   `json:"api_flavor"`
	Desc          string   `json:"desc"`
	Method        string   `json:"method"`
	Url           string   `json:"url"`
	AuthType      string   `json:"auth_type"`
	AuthKey       string   `json:"auth_key"`
	Models        []string `json:"models"`
	ExtraHeaders  string   `json:"extra_headers"`
	ExtraJsonBody string   `json:"extra_json_body"`
	Properties    string   `json:"properties"`
}

type UpdateServiceProviderResponse

type UpdateServiceProviderResponse struct {
	bcode.Bcode
}

Jump to

Keyboard shortcuts

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