openrouter

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOpenRouterChatProvider

func NewOpenRouterChatProvider(config *OpenRouterConfig) contracts.IChatAIProvider

NewOpenRouterChatProvider initializes a new OpenAPIProvider.

Types

type OpenRouterConfig

type OpenRouterConfig struct {
	BaseURL         string
	Model           string
	Temperature     *float32
	ReasoningEffort *string
	EncodingFormat  string
	ApiKey          string
	MaxTokens       int
	TokenManagement contracts2.ITokenManagement
	ApiVersion      string
}

OpenRouterConfig implements the Provider interface for OpenAPI.

func (*OpenRouterConfig) ChatCompletionRequest

func (openRouterProvider *OpenRouterConfig) ChatCompletionRequest(ctx context.Context, userInput string, prompt string) <-chan general_models.StreamResponse

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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