clients

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveLlmClient

func ResolveLlmClient(apiType string, apiUrl string, systemMessage string) util.LlmClient

Types

type GeminiClient

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

func NewGeminiClient

func NewGeminiClient(systemMessage string) *GeminiClient

func (GeminiClient) RequestCompletion

func (c GeminiClient) RequestCompletion(
	ctx context.Context,
	chatMsgs []util.LocalStoreMessage,
	modelSettings util.Settings,
	resultChan chan util.ProcessApiCompletionResponse,
) tea.Cmd

func (GeminiClient) RequestModelsList

func (c GeminiClient) RequestModelsList(ctx context.Context) util.ProcessModelsResponse

type OpenAIConversationTurn added in v0.8.0

type OpenAIConversationTurn struct {
	Model      string           `json:"model"`
	Role       string           `json:"role"`
	Content    []OpenAiContent  `json:"content"`
	ToolCalls  []OpenAiToolCall `json:"tool_calls,omitempty"`
	ToolCallId string           `json:"tool_call_id"`
}

type OpenAiClient

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

func NewOpenAiClient

func NewOpenAiClient(apiUrl, systemMessage string) *OpenAiClient

func (OpenAiClient) RequestCompletion

func (c OpenAiClient) RequestCompletion(
	ctx context.Context,
	chatMsgs []util.LocalStoreMessage,
	modelSettings util.Settings,
	resultChan chan util.ProcessApiCompletionResponse,
) tea.Cmd

func (OpenAiClient) RequestModelsList

func (c OpenAiClient) RequestModelsList(ctx context.Context) util.ProcessModelsResponse

type OpenAiContent added in v0.8.0

type OpenAiContent interface{}

type OpenAiFuncitonParameters added in v0.8.0

type OpenAiFuncitonParameters struct {
	Type       string         `json:"type"`
	Required   []string       `json:"required"`
	Properties map[string]any `json:"properties"`
}

type OpenAiFunction added in v0.8.0

type OpenAiFunction struct {
	Name        string                   `json:"name"`
	Description string                   `json:"description"`
	Parameters  OpenAiFuncitonParameters `json:"parameters"`
}

type OpenAiImage added in v0.8.0

type OpenAiImage struct {
	URL string `json:"url"`
}

type OpenAiImageContent added in v0.8.0

type OpenAiImageContent struct {
	Type     string      `json:"type"`
	Text     string      `json:"text,omitempty"`
	ImageURL OpenAiImage `json:"image_url,omitempty"`
}

type OpenAiTextContent added in v0.8.0

type OpenAiTextContent struct {
	Type string `json:"type"`
	Text string `json:"text,omitempty"`
}

type OpenAiToolCall added in v0.8.0

type OpenAiToolCall struct {
	Id       string             `json:"id"`
	Type     string             `json:"type"`
	Function OpenAiToolFunction `json:"function"`
}

type OpenAiToolCallsBuffer added in v0.8.0

type OpenAiToolCallsBuffer struct {
	Chunks []OpenAiToolCallsDelta
}

type OpenAiToolCallsDelta added in v0.8.0

type OpenAiToolCallsDelta struct {
	Id       *string            `json:"id"`
	Type     *string            `json:"type"`
	Function OpenAiToolFunction `json:"function"`
	Index    int                `json:"index"`
}

type OpenAiToolContent added in v0.8.0

type OpenAiToolContent struct {
	Type string `json:"type"`
	Text string `json:"text"`
}

type OpenAiToolDefinition added in v0.8.0

type OpenAiToolDefinition struct {
	Type     string         `json:"type"`
	Function OpenAiFunction `json:"function"`
}

type OpenAiToolFunction added in v0.8.0

type OpenAiToolFunction struct {
	Name      *string `json:"name"`
	Arguments string  `json:"arguments"`
}

type OpenRouterToolCallsBuffer added in v0.8.0

type OpenRouterToolCallsBuffer struct {
	Chunks []openrouter.ToolCall
}

type OpenrouterClient added in v0.7.9

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

func NewOpenrouterClient added in v0.7.9

func NewOpenrouterClient(systemMessage string) *OpenrouterClient

func (OpenrouterClient) RequestCompletion added in v0.7.9

func (c OpenrouterClient) RequestCompletion(
	ctx context.Context,
	chatMsgs []util.LocalStoreMessage,
	modelSettings util.Settings,
	resultChan chan util.ProcessApiCompletionResponse,
) tea.Cmd

func (OpenrouterClient) RequestModelsList added in v0.7.9

func (c OpenrouterClient) RequestModelsList(ctx context.Context) util.ProcessModelsResponse

Jump to

Keyboard shortcuts

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