tooling

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const GenerateAndStoreHandlersCodeToolName = "generate_and_store_handlers_code"
View Source
const GenerateEndpointsToolName = "generate_endpoints"
View Source
const GenerateSchemaToolName = "generate_schema"
View Source
const ListTablesToolName = "list_tables"
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 Endpoint

type Endpoint struct {
	Method      string `json:"method"`
	Path        string `json:"path"`
	Description string `json:"description"`
}

type Endpoints

type Endpoints struct {
	Resource  string     `json:"resource"`
	BasePath  string     `json:"base_path"`
	Endpoints []Endpoint `json:"endpoints"`
}

type Schema

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

type Service

type Service struct {
	DB        *sqlx.DB
	OpenAICli *openai.Client
}

func New

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

func (*Service) GenerateAndStoreHandlersCode

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

func (*Service) GenerateAndStoreHandlersCodeTool

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

func (*Service) GenerateEndpoints

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

func (*Service) GenerateEndpointsTool

func (s *Service) GenerateEndpointsTool() 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) ListTables

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

func (*Service) ListTablesTool

func (s *Service) ListTablesTool() 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