Help us shape the future of Go! Take the 2026 Go Developer Survey

tooling

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const BuildCodeToolName = "build_code"
View Source
const GenerateHandlersCodeToolName = "generate_handlers_code"
View Source
const GenerateOpenAPISpecToolName = "generate_openapi_spec"
View Source
const GenerateSchemaToolName = "generate_schema"
View Source
const GenerateServiceCodeToolName = "generate_service_code"
View Source
const ListTablesToolName = "list_tables"
View Source
const QueryKnowledgeBaseToolName = "query_knowledge_base"
View Source
const StoreSchemaToolName = "store_schema"

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Constraints string `json:"constraints"`
}

type Schema

type Schema struct {
	TableName string   `json:"table_name"`
	Columns   []Column `json:"columns"`
}

type Service

type Service struct {
	DB        *sqlx.DB
	KnowDB    *vector.Service
	OpenAICli *openai.Client
	TmpDir    string
}

func New

func New(db *sqlx.DB, knowDB *vector.Service, cli *openai.Client) (*Service, error)

func (*Service) BuildCode added in v0.0.2

func (s *Service) BuildCode(ctx context.Context) string

func (*Service) BuildCodeTool added in v0.0.2

func (s *Service) BuildCodeTool() openai.ChatCompletionToolParam

func (*Service) Clear added in v0.0.2

func (s *Service) Clear()

func (*Service) GenerateHandlersCode added in v0.0.2

func (s *Service) GenerateHandlersCode(ctx context.Context) string

func (*Service) GenerateHandlersCodeTool added in v0.0.2

func (s *Service) GenerateHandlersCodeTool() openai.ChatCompletionToolParam

func (*Service) GenerateOpenAPISpec added in v0.0.2

func (s *Service) GenerateOpenAPISpec(ctx context.Context, arguments string) string

func (*Service) GenerateOpenAPISpecTool added in v0.0.2

func (s *Service) GenerateOpenAPISpecTool() openai.ChatCompletionToolParam

func (*Service) GenerateSchema

func (s *Service) GenerateSchema(ctx context.Context, arguments string) string

func (*Service) GenerateSchemaTool

func (s *Service) GenerateSchemaTool() openai.ChatCompletionToolParam

func (*Service) GenerateServiceCode added in v0.0.2

func (s *Service) GenerateServiceCode(ctx context.Context, arguments string) string

func (*Service) GenerateServiceCodeTool added in v0.0.2

func (s *Service) GenerateServiceCodeTool() openai.ChatCompletionToolParam

func (*Service) ListTables

func (s *Service) ListTables(ctx context.Context) string

func (*Service) ListTablesTool

func (s *Service) ListTablesTool() openai.ChatCompletionToolParam

func (*Service) QueryKnowledgeBase added in v0.0.3

func (s *Service) QueryKnowledgeBase(ctx context.Context, arguments string) string

func (*Service) QueryKnowledgeBaseTool added in v0.0.3

func (s *Service) QueryKnowledgeBaseTool() openai.ChatCompletionToolParam

func (*Service) StoreSchema

func (s *Service) StoreSchema(ctx context.Context, arguments string) string

func (*Service) StoreSchemaTool

func (s *Service) StoreSchemaTool() openai.ChatCompletionToolParam

Jump to

Keyboard shortcuts

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