INNER CODE UNIT · Go

func

sozercan/kubectl-ai · cmd/cli/functions.go:58

func (s *schema) Run() (content string, err error) {
	schema, err := fetchSchemaForResource(s.ResourceType)
	if err != nil {
		return "", err
	}

	schemaBytes, err := json.Marshal(schema)
	if err != nil {
		return "", err
	}

	return string(schemaBytes), nil
}

func callTool(toolCall openai.ToolCall) (string, error) {
	switch toolCall.Function.Name {
	case findSchemaNames.Name:
		var f schemaNames

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…