Documentation
¶
Index ¶
- Constants
- func TrimNonCode(text, typ string) string
- type Agent
- type Column
- type Schema
- type Service
- func (s *Service) Agent(prompt, userInput string) *Agent
- func (s *Service) BuildCode(ctx context.Context) string
- func (s *Service) BuildCodeTool() openai.ChatCompletionToolParam
- func (s *Service) Clear()
- func (s *Service) GenerateHandlersCode(ctx context.Context) string
- func (s *Service) GenerateHandlersCodeTool() openai.ChatCompletionToolParam
- func (s *Service) GenerateOpenAPISpec(ctx context.Context, arguments string) string
- func (s *Service) GenerateOpenAPISpecTool() openai.ChatCompletionToolParam
- func (s *Service) GenerateSchema(ctx context.Context, arguments string) string
- func (s *Service) GenerateSchemaTool() openai.ChatCompletionToolParam
- func (s *Service) GenerateServerCode(ctx context.Context, arguments string) string
- func (s *Service) GenerateServerCodeTool() openai.ChatCompletionToolParam
- func (s *Service) HandleToolCall(ctx context.Context, tool openai.ChatCompletionMessageToolCallFunction) string
- func (s *Service) ListTables(ctx context.Context) string
- func (s *Service) ListTablesTool() openai.ChatCompletionToolParam
- func (s *Service) QueryKnowledgeBase(ctx context.Context, arguments string) string
- func (s *Service) QueryKnowledgeBaseTool() openai.ChatCompletionToolParam
- func (s *Service) QueryMemory(ctx context.Context, arguments string) string
- func (s *Service) QueryMemoryTool() openai.ChatCompletionToolParam
- func (s *Service) SaveServerCode(_ context.Context, arguments string) string
- func (s *Service) SaveServerCodeTool() openai.ChatCompletionToolParam
- func (s *Service) StoreSchema(ctx context.Context, arguments string) string
- func (s *Service) StoreSchemaTool() openai.ChatCompletionToolParam
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 GenerateServerCodeToolName = "generate_server_code"
View Source
const ListTablesToolName = "list_tables"
View Source
const QueryKnowledgeBaseToolName = "query_knowledge_base"
View Source
const QueryMemoryToolName = "query_memory"
View Source
const SaveServerCodeToolName = "save_server_code"
View Source
const StoreSchemaToolName = "store_schema"
Variables ¶
This section is empty.
Functions ¶
func TrimNonCode ¶ added in v0.0.7
Types ¶
type Service ¶
type Service struct {
DB *sqlx.DB
KS *vector.KnowledgeService
Mem *vector.MemoryService
OpenAICli *openai.Client
ChatModel string
CodeModel string
TmpDir string
}
func (*Service) BuildCodeTool ¶ added in v0.0.2
func (s *Service) BuildCodeTool() openai.ChatCompletionToolParam
func (*Service) GenerateHandlersCode ¶ added in v0.0.2
func (*Service) GenerateHandlersCodeTool ¶ added in v0.0.2
func (s *Service) GenerateHandlersCodeTool() openai.ChatCompletionToolParam
func (*Service) GenerateOpenAPISpec ¶ added in v0.0.2
func (*Service) GenerateOpenAPISpecTool ¶ added in v0.0.2
func (s *Service) GenerateOpenAPISpecTool() openai.ChatCompletionToolParam
func (*Service) GenerateSchema ¶
func (*Service) GenerateSchemaTool ¶
func (s *Service) GenerateSchemaTool() openai.ChatCompletionToolParam
func (*Service) GenerateServerCode ¶ added in v0.0.5
func (*Service) GenerateServerCodeTool ¶ added in v0.0.5
func (s *Service) GenerateServerCodeTool() openai.ChatCompletionToolParam
func (*Service) HandleToolCall ¶ added in v0.0.7
func (*Service) ListTablesTool ¶
func (s *Service) ListTablesTool() openai.ChatCompletionToolParam
func (*Service) QueryKnowledgeBase ¶ added in v0.0.3
func (*Service) QueryKnowledgeBaseTool ¶ added in v0.0.3
func (s *Service) QueryKnowledgeBaseTool() openai.ChatCompletionToolParam
func (*Service) QueryMemory ¶ added in v0.0.7
func (*Service) QueryMemoryTool ¶ added in v0.0.7
func (s *Service) QueryMemoryTool() openai.ChatCompletionToolParam
func (*Service) SaveServerCode ¶ added in v0.0.5
func (*Service) SaveServerCodeTool ¶ added in v0.0.5
func (s *Service) SaveServerCodeTool() openai.ChatCompletionToolParam
func (*Service) StoreSchema ¶
func (*Service) StoreSchemaTool ¶
func (s *Service) StoreSchemaTool() openai.ChatCompletionToolParam
Click to show internal directories.
Click to hide internal directories.