inference

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIStatusError

type APIStatusError struct {
	Status int
	Body   string
	Code   string
}

APIStatusError conveys an HTTP error response from an upstream LLM API. Use errors.As to extract structured status/body details from a wrapped chain.

func (*APIStatusError) Error

func (e *APIStatusError) Error() string

func (*APIStatusError) ProviderErrorCode

func (e *APIStatusError) ProviderErrorCode() string

ProviderErrorCode implements tacklr.ProviderStatus.

func (*APIStatusError) ProviderHTTPStatus

func (e *APIStatusError) ProviderHTTPStatus() int

ProviderHTTPStatus implements tacklr.ProviderStatus.

type OpenAIInferenceStrategy

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

func NewOpenAIInferenceStrategy

func NewOpenAIInferenceStrategy(client *http.Client) *OpenAIInferenceStrategy

func (*OpenAIInferenceStrategy) CompressContextWindow

func (s *OpenAIInferenceStrategy) CompressContextWindow() error

func (*OpenAIInferenceStrategy) CountTokens

func (s *OpenAIInferenceStrategy) CountTokens(ctx context.Context, messages []*tacklr.Message, tools []*tacklr.Tool) (int, error)

func (*OpenAIInferenceStrategy) Invoke

func (s *OpenAIInferenceStrategy) Invoke(ctx context.Context, messages []*tacklr.Message, tools []*tacklr.Tool) (chan tacklr.LLMResponseChunk, error)

func (*OpenAIInferenceStrategy) MaxContextWindow

func (s *OpenAIInferenceStrategy) MaxContextWindow() (int, error)

func (*OpenAIInferenceStrategy) ModelTelemetryIdentity

func (s *OpenAIInferenceStrategy) ModelTelemetryIdentity() telemetry.ModelIdentity

ModelTelemetryIdentity implements the optional harness hook so model spans get GenAI provider/model attrs without exporting raw config fields.

func (*OpenAIInferenceStrategy) SetSystemPrompt

func (s *OpenAIInferenceStrategy) SetSystemPrompt(prompt string)

func (*OpenAIInferenceStrategy) SupportsMIME

func (s *OpenAIInferenceStrategy) SupportsMIME(mimeType string) bool

SupportsMIME implements tacklr.InferenceStrategy for the selected model id.

func (*OpenAIInferenceStrategy) WithApiKey

func (*OpenAIInferenceStrategy) WithMaxOutputTokens

func (s *OpenAIInferenceStrategy) WithMaxOutputTokens(n int) *OpenAIInferenceStrategy

WithMaxOutputTokens sets Responses API max_output_tokens (0 omits the field). Raise this for Azure reasoning models after large tool results (e.g. web_search) so streams do not end as bare response.incomplete.

func (*OpenAIInferenceStrategy) WithModel

func (*OpenAIInferenceStrategy) WithReasoningLevel

func (s *OpenAIInferenceStrategy) WithReasoningLevel(level string) tacklr.InferenceStrategy

func (*OpenAIInferenceStrategy) WithReasoningSummary

func (s *OpenAIInferenceStrategy) WithReasoningSummary(summary string) *OpenAIInferenceStrategy

WithReasoningSummary sets reasoning.summary on Responses API requests ("auto", "concise", "detailed"). Empty clears it.

func (*OpenAIInferenceStrategy) WithStructuredOutput

func (s *OpenAIInferenceStrategy) WithStructuredOutput(v any) tacklr.InferenceStrategy

func (*OpenAIInferenceStrategy) WithURL

Jump to

Keyboard shortcuts

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