ai

package
v2.23.2 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2025 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LanguageModel

type LanguageModel struct {
	codersdk.LanguageModel
	StreamFunc StreamFunc
}

type LanguageModels

type LanguageModels map[string]LanguageModel

LanguageModels is a map of language model ID to language model.

func ModelsFromConfig

func ModelsFromConfig(ctx context.Context, configs []codersdk.AIProviderConfig) (LanguageModels, error)

type StreamFunc

type StreamFunc func(ctx context.Context, options StreamOptions) (aisdk.DataStream, error)

type StreamOptions

type StreamOptions struct {
	SystemPrompt string
	Model        string
	Messages     []aisdk.Message
	Thinking     bool
	Tools        []aisdk.Tool
}

Jump to

Keyboard shortcuts

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