ai

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RepositoryBaseTypeRetrieval = "retrieval"
	RepositoryBaseTypeFineTune  = "finetune"
)

Variables

View Source
var ErrInsufficientCredit = credit.ErrInsufficientCredit

Functions

func InitCommonHandlers

func InitCommonHandlers(log *log.HandlerBuilder,
	cfg *config.HandlerBuilder,
	credit *credit.HandlerBuilder,
	record *record.HandlerBuilder) []handler.Builder

func InitCompositionHandlerUsingZhipu added in v0.3.2

func InitCompositionHandlerUsingZhipu(common []handler.Builder,
	root *zhipu.Handler) handler.Handler

func InitLLMCreditLogDAO

func InitLLMCreditLogDAO(db *egorm.Component) dao.LLMCreditDAO

func InitTableOnce

func InitTableOnce(db *gorm.DB)

func InitZhipu

func InitZhipu() *zhipu.Handler

Types

type AdminHandler added in v0.3.2

type AdminHandler = web.AdminHandler

type KnowledgeBaseFile added in v0.3.3

type KnowledgeBaseFile = domain.KnowledgeBaseFile

type KnowledgeBaseService added in v0.3.3

type KnowledgeBaseService = knowledge_base.RepositoryBaseSvc

func InitZhipuKnowledgeBase added in v0.3.3

func InitZhipuKnowledgeBase(repo repository.KnowledgeBaseRepo) KnowledgeBaseService

type LLMHandler added in v0.3.2

type LLMHandler = web.Handler

type LLMRequest

type LLMRequest = domain.LLMRequest

type LLMResponse

type LLMResponse = domain.LLMResponse

type LLMService

type LLMService = llm.Service

type Module

type Module struct {
	Svc              LLMService
	KnowledgeBaseSvc KnowledgeBaseService
	Hdl              *LLMHandler
	AdminHandler     *AdminHandler
	C                *event.KnowledgeBaseConsumer
}

func InitModule

func InitModule(db *gorm.DB, creditSvc *credit.Module, q mq.MQ) (*Module, error)

Directories

Path Synopsis
internal
service/llm/handler/mocks
Code generated by MockGen.
Code generated by MockGen.
web
Package aimocks is a generated GoMock package.
Package aimocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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