xai

package
v1.39.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 15 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 XAIClient

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

func NewXAIClient

func NewXAIClient(apiKey, model string, logger *zap.Logger, maxAttempts int, backoff time.Duration) *XAIClient

NewXAIClient cria uma nova instância de XAIClient.

func (*XAIClient) GetModelName

func (c *XAIClient) GetModelName() string

GetModelName retorna o nome do modelo de linguagem utilizado.

func (*XAIClient) SendPrompt

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

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

Jump to

Keyboard shortcuts

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