assist

package
v0.14.2-beta Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 27 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnvironmentTable

func NewEnvironmentTable(env map[string]ParsedField, config config.Config) table.Table

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

func PrintAssistAnswer(content string) error

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

type ChatMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

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

type RAGDeploymentResult struct {
	ContainerID string
	HostPort    string
}

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

Jump to

Keyboard shortcuts

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