Documentation
¶
Index ¶
- func RequestToUnified(req llm.Request) (agentunified.Request, error)
- type Client
- type CompletionsRequest
- type HTTPErrorAction
- type MessagesCacheControl
- type MessagesMessage
- type MessagesRequest
- type MessagesSystemBlocks
- type MessagesThinkingConfig
- type MessagesToolDefinition
- type Option
- func WithAPIHint(hint llm.ApiType) Option
- func WithAPIHintResolver(fn func(req llm.Request) llm.ApiType) Option
- func WithBasePath(path string) Option
- func WithBaseURL(url string) Option
- func WithBaseURLFunc(fn func() string) Option
- func WithCachedModelsFunc(fn func(ctx context.Context) (llm.Models, error)) Option
- func WithCompletionsRequestTransform(fn func(*CompletionsRequest) error) Option
- func WithDefaultHeaders(h http.Header) Option
- func WithErrorParser(fn func(int, []byte) error) Option
- func WithHTTPErrorActionResolver(fn func(llm.Request, int, error) HTTPErrorAction) Option
- func WithHeaderFunc(fn func(ctx context.Context, req *llm.Request) (http.Header, error)) Option
- func WithMessagesAPITokenCounter(...) Option
- func WithMessagesRequestTransform(fn func(*MessagesRequest) error) Option
- func WithModels(models llm.Models) Option
- func WithModelsFunc(fn func(ctx context.Context) (llm.Models, error)) Option
- func WithMutateRequest(fn func(*http.Request)) Option
- func WithPreprocessRequest(fn func(llm.Request) (llm.Request, string, error)) Option
- func WithProviderName(name string) Option
- func WithRateLimitParser(fn func(*http.Response) *llm.RateLimits) Option
- func WithResponsesRequestTransform(fn func(*ResponsesRequest) error) Option
- func WithUsageExtras(fn func(*http.Response) map[string]any) Option
- type Options
- type Provider
- type ResponsesRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestToUnified ¶
func RequestToUnified(req llm.Request) (agentunified.Request, error)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client orchestrates request preprocessing, agentapis streaming, and llm event publication.
type CompletionsRequest ¶
type CompletionsRequest = completionsapi.Request
type HTTPErrorAction ¶
type HTTPErrorAction int
HTTPErrorAction describes how providercore should surface a non-2xx API response.
const ( HTTPErrorActionReturn HTTPErrorAction = iota HTTPErrorActionStream )
type MessagesCacheControl ¶
type MessagesCacheControl = messagesapi.CacheControl
type MessagesMessage ¶
type MessagesMessage = messagesapi.Message
type MessagesRequest ¶
type MessagesRequest = messagesapi.Request
type MessagesSystemBlocks ¶
type MessagesSystemBlocks = messagesapi.SystemBlocks
type MessagesThinkingConfig ¶
type MessagesThinkingConfig = messagesapi.ThinkingConfig
type MessagesToolDefinition ¶
type MessagesToolDefinition = messagesapi.ToolDefinition
type Option ¶
type Option struct {
// contains filtered or unexported fields
}
Option configures a providercore Provider or Client.
func WithAPIHint ¶
func WithBasePath ¶
func WithBaseURL ¶
func WithBaseURLFunc ¶
func WithCachedModelsFunc ¶
func WithCompletionsRequestTransform ¶
func WithCompletionsRequestTransform(fn func(*CompletionsRequest) error) Option
func WithDefaultHeaders ¶
func WithHeaderFunc ¶
func WithMessagesAPITokenCounter ¶
func WithMessagesAPITokenCounter(fn func(context.Context, llm.Request, *MessagesRequest) (*tokencount.TokenCount, error)) Option
func WithMessagesRequestTransform ¶
func WithMessagesRequestTransform(fn func(*MessagesRequest) error) Option
func WithModels ¶
func WithMutateRequest ¶
func WithPreprocessRequest ¶
func WithProviderName ¶
func WithRateLimitParser ¶
func WithRateLimitParser(fn func(*http.Response) *llm.RateLimits) Option
func WithResponsesRequestTransform ¶
func WithResponsesRequestTransform(fn func(*ResponsesRequest) error) Option
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements llm.Provider backed by a providercore Client.
func (*Provider) CreateStream ¶
type ResponsesRequest ¶
type ResponsesRequest = responsesapi.Request
Click to show internal directories.
Click to hide internal directories.