stackspotai

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

* ChatCLI - Command Line Interface for LLM interaction * Copyright (c) 2024 Edilson Freitas * License: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackResponse

type CallbackResponse struct {
	ExecutionID      string   `json:"execution_id"`
	QuickCommandSlug string   `json:"quick_command_slug"`
	ConversationID   string   `json:"conversation_id"`
	Progress         Progress `json:"progress"`
	Steps            []Step   `json:"steps"`
	Result           string   `json:"result"`
}

type Progress

type Progress struct {
	Start               string  `json:"start"`
	End                 string  `json:"end"`
	Duration            int     `json:"duration"`
	ExecutionPercentage float64 `json:"execution_percentage"`
	Status              string  `json:"status"`
}

type Source

type Source struct {
	Type          string  `json:"type,omitempty"`
	Name          string  `json:"name,omitempty"`
	Slug          string  `json:"slug,omitempty"`
	DocumentType  string  `json:"document_type,omitempty"`
	DocumentScore float64 `json:"document_score,omitempty"`
	DocumentID    string  `json:"document_id,omitempty"`
}

type StackSpotClient

type StackSpotClient struct {
	// contains filtered or unexported fields
}

StackSpotClient implementa o cliente para interagir com a API da StackSpot

func NewStackSpotClient

func NewStackSpotClient(tokenManager *token.TokenManager, slug string, logger *zap.Logger, maxAttempts int, backoff time.Duration) *StackSpotClient

NewStackSpotClient cria uma nova instância de StackSpotClient.

func (*StackSpotClient) GetModelName

func (c *StackSpotClient) GetModelName() string

GetModelName retorna o nome do modelo de linguagem utilizado pelo cliente.

func (*StackSpotClient) SendPrompt

func (c *StackSpotClient) SendPrompt(ctx context.Context, prompt string, history []models.Message) (string, error)

SendPrompt envia um prompt para o modelo de linguagem e retorna a resposta.

type Step

type Step struct {
	StepName       string     `json:"step_name"`
	ExecutionOrder int        `json:"execution_order"`
	Type           string     `json:"type"`
	StepResult     StepResult `json:"step_result"`
}

type StepResult

type StepResult struct {
	Answer  string   `json:"answer"`
	Sources []Source `json:"sources"`
}

Jump to

Keyboard shortcuts

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