Documentation
¶
Overview ¶
Package assist provides AI-powered chaos engineering assistance using RAG (Retrieval-Augmented Generation). It manages the deployment of the assist service container and handles interactive queries. Generated by Claude Code
Package assist provides AI-powered chaos engineering assistance using RAG (Retrieval-Augmented Generation). This file contains data structures for the assist service API and deployment.
Index ¶
- func NewEnvironmentTable(env map[string]ParsedField, config config.Config) table.Table
- func PerformAssistHealthCheck(containerID string, hostPort string, ...) (bool, error)
- func PrintAssistAnswer(content string) error
- func StartInteractivePrompt(containerID string, hostPort string, ...) error
- type ChatMessage
- type HealthResponse
- type ParsedField
- type QueryChoice
- type QueryRequest
- type QueryResponse
- type RAGDeploymentResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEnvironmentTable ¶
NewEnvironmentTable creates a table to display environment variables
func PerformAssistHealthCheck ¶
func PerformAssistHealthCheck(containerID string, hostPort string, orchestrator scenarioorchestrator.ScenarioOrchestrator, ctx context.Context, config config.Config) (bool, error)
PerformAssistHealthCheck performs health checking with timeout and cleanup on failure
func PrintAssistAnswer ¶
PrintAssistAnswer prints Lightspeed AI response with beautiful formatting
func StartInteractivePrompt ¶
func StartInteractivePrompt(containerID string, hostPort string, orchestrator scenarioorchestrator.ScenarioOrchestrator, ctx context.Context, config config.Config, thinkingSpinner *spinner.Spinner, scenarioProvider provider.ScenarioDataProvider) error
StartInteractivePrompt starts an interactive chat session with the Lightspeed service
Types ¶
type ChatMessage ¶
ChatMessage represents a message in OpenAI format
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
Service string `json:"service"`
Model string `json:"model"`
DocumentsIndexed int `json:"documents_indexed"`
}
HealthResponse represents the health check response
type ParsedField ¶
type ParsedField struct {
// contains filtered or unexported fields
}
ParsedField represents a parsed field with its value and whether it's secret
type QueryChoice ¶
type QueryChoice struct {
Index int `json:"index"`
Message struct {
Role string `json:"role"`
Content string `json:"content"`
} `json:"message"`
FinishReason string `json:"finish_reason"`
}
QueryChoice represents a choice in OpenAI response format
type QueryRequest ¶
type QueryRequest struct {
Model string `json:"model"`
Messages []ChatMessage `json:"messages"`
Temperature float64 `json:"temperature,omitempty"`
MaxTokens int `json:"max_tokens,omitempty"`
Stream bool `json:"stream,omitempty"`
}
QueryRequest represents an OpenAI-compatible chat completion request
type QueryResponse ¶
type QueryResponse struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
Model string `json:"model"`
Choices []QueryChoice `json:"choices"`
Usage struct {
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalTokens int `json:"total_tokens"`
} `json:"usage"`
ScenarioName *string `json:"scenario_name,omitempty"` // krknctl scenario name if detected
}
QueryResponse represents an OpenAI-compatible response
type RAGDeploymentResult ¶
RAGDeploymentResult holds information about the deployed RAG model
func DeployAssistModel ¶
func DeployAssistModel(ctx context.Context, orchestrator scenarioorchestrator.ScenarioOrchestrator, config config.Config, registry *models.RegistryV2, pullSpinner *spinner.Spinner) (*RAGDeploymentResult, error)
DeployAssistModel deploys the RAG model container using GPU-specific image