clients

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroqClient

type GroqClient interface {
	Transcribe(
		model string,
		language string,
		audioURL *string,
		audioBytes *[]byte,
		timeOut *int,
	) (t.GroqTranscriptionResponse, error)
}

func NewGroqClient

func NewGroqClient(apiKey string) GroqClient

type OpenRouterClient

type OpenRouterClient interface {
	GenerateText(
		messages []t.MessageForLLM,
		messageParts []t.PartMessageForLLM,
		model string,
		temperature *float64,
		maxTokens *int,
		timeOut *int,
		reasoning *t.ReasoningConfig,
		provider *t.ProviderConfig,
	) (t.OpenRouterResponse, error)

	GenerateTools(
		messages []t.MessageForLLM,
		messageParts []t.PartMessageForLLM,
		tools []t.ToolSchema,
		model string,
		temperature *float64,
		maxTokens *int,
		timeOut *int,
		reasoning *t.ReasoningConfig,
		provider *t.ProviderConfig,
	) (t.OpenRouterResponse, error)

	GenerateStructured(
		messages []t.MessageForLLM,
		messageParts []t.PartMessageForLLM,
		schema t.StructuredOutputSchema,
		model string,
		temperature *float64,
		maxTokens *int,
		timeOut *int,
		reasoning *t.ReasoningConfig,
		provider *t.ProviderConfig,
	) (t.OpenRouterResponse, error)
}

func NewOpenRouterClient

func NewOpenRouterClient(
	apiKey string,
	enableRetry bool,
	retryModel string,
	retryModelReasoningConfig *t.ReasoningConfig,
) OpenRouterClient

Creates a new open router OpenRouterClient. If retry is enabled and the model name is "" we set openai/gpt-oss-120b:nitro as default and reasoningConfig to nil. Otherwise, it is your responsibility to provide a valid model name and reasoningConfig for that model.