service

package
v1.9.3-beta Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatCompletion

type ChatCompletion struct {
	Object  string       `json:"object"`
	Choices []FullChoice `json:"choices"`
}

ChatCompletion represents the structure of a non-streaming response

type ChatCompletionChunk

type ChatCompletionChunk struct {
	Object  string   `json:"object"`
	Choices []Choice `json:"choices"`
}

ChatCompletionChunk represents the structure of a single chunk in the streaming response

type Choice

type Choice struct {
	Delta        Delta   `json:"delta"`
	FinishReason *string `json:"finish_reason"`
}

Choice represents a choice in the streaming chunk

type Delta

type Delta struct {
	Content string `json:"content"`
	Role    string `json:"role,omitempty"`
}

Delta represents the delta content in a streaming choice

type FullChoice

type FullChoice struct {
	Message Message `json:"message"`
}

FullChoice represents a choice in the non-streaming response

type IAppModule

type IAppModule interface {
	CreateApp(ctx context.Context, teamID string, input *service_dto.CreateApp) (*service_dto.App, error)
	UpdateApp(ctx context.Context, appId string, input *service_dto.UpdateApp) (*service_dto.App, error)
	Search(ctx context.Context, teamId string, keyword string) ([]*service_dto.AppItem, error)
	SearchMyApps(ctx context.Context, teamId string, keyword string) ([]*service_dto.AppItem, error)
	SearchCanSubscribe(ctx context.Context, serviceId string) ([]*service_dto.SubscribeAppItem, bool, error)
	// SimpleApps 获取简易项目列表
	SimpleApps(ctx context.Context, keyword string) ([]*service_dto.SimpleAppItem, error)
	MySimpleApps(ctx context.Context, keyword string) ([]*service_dto.SimpleAppItem, error)
	GetApp(ctx context.Context, appId string) (*service_dto.App, error)
	DeleteApp(ctx context.Context, appId string) error
}

type IExportAppModule

type IExportAppModule interface {
	system.IExportModule[service_dto.ExportApp]
}

type IExportServiceModule

type IExportServiceModule interface {
	system.IExportModule[service_dto.ExportService]
}

type ILogModule

type ILogModule interface {
	AILogs(ctx context.Context, serviceId string, start int64, end int64, page int, size int) ([]*service_dto.AILogItem, int64, error)
	RestLogs(ctx context.Context, serviceId string, start int64, end int64, page int, size int) ([]*service_dto.RestLogItem, int64, error)
	RestLogInfo(ctx context.Context, serviceId string, logId string) (*service_dto.RestLogInfo, error)
	AILogInfo(ctx context.Context, serviceId string, logId string) (*service_dto.AILogInfo, error)
}

type IServiceDocModule

type IServiceDocModule interface {
	ServiceDoc(ctx context.Context, pid string) (*service_dto.ServiceDoc, error)
	// SaveServiceDoc 保存服务文档
	SaveServiceDoc(ctx context.Context, pid string, input *service_dto.SaveServiceDoc) error
}

type IServiceModule

type IServiceModule interface {
	// Get 获取项目信息
	Get(ctx context.Context, id string) (*service_dto.Service, error)
	// Search 搜索项目
	Search(ctx context.Context, teamID string, keyword string) ([]*service_dto.ServiceItem, error)
	// SearchMyServices 搜索
	SearchMyServices(ctx context.Context, teamId string, keyword string) ([]*service_dto.ServiceItem, error)
	// Create 创建
	Create(ctx context.Context, teamID string, input *service_dto.CreateService) (*service_dto.Service, error)
	// Edit 编辑
	Edit(ctx context.Context, id string, input *service_dto.EditService) (*service_dto.Service, error)
	// Delete 删除项目
	Delete(ctx context.Context, id string) error

	//Simple 获取简易项目列表
	Simple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error)

	//MySimple 获取我的简易项目列表
	MySimple(ctx context.Context) ([]*service_dto.SimpleServiceItem, error)

	ServiceOverview(ctx context.Context, id string) (*service_dto.Overview, error)
	ILogModule
}

type Message

type Message struct {
	Content string `json:"content"`
	Role    string `json:"role"`
}

Message represents the message content in a non-streaming choice

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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