Documentation
¶
Index ¶
- Variables
- func GetEnabledAIConfig(modelType enums.AIModelType) (*models.AIConfig, error)
- func ResolveAIConfig(ctx context.Context, modelType enums.AIModelType, customConfigID int64) (*models.AIConfig, error)
- func ResolveVisionAIConfig(ctx context.Context, customConfigID int64) (*models.AIConfig, error)
- func SetPlatformAIProvider(provider contract.PlatformAIProvider)
- func WithPlatformAIRequestPurpose(ctx context.Context, purpose string) context.Context
- func WithPlatformAIRequestScope(ctx context.Context, base string) context.Context
- type ChatCompletionResult
- type EmbeddingResult
- type ImageInput
- type ToolCall
- type ToolCallExecutor
- type ToolDefinition
- type ToolLoopResult
Constants ¶
This section is empty.
Variables ¶
var Embedding = &embedding{}
var ErrPlatformModelUnsupported = errors.New("system built-in AI model type is unsupported")
ErrPlatformModelUnsupported means platform mode intentionally does not expose this model capability. Callers may use errors.Is to apply a silent, deterministic fallback without treating it as an upstream outage.
var LLM = &llm{}
Functions ¶
func GetEnabledAIConfig ¶
func GetEnabledAIConfig(modelType enums.AIModelType) (*models.AIConfig, error)
func ResolveAIConfig ¶
func ResolveAIConfig(ctx context.Context, modelType enums.AIModelType, customConfigID int64) (*models.AIConfig, error)
ResolveAIConfig resolves the effective model configuration for one logical AI call. Platform mode always uses the host gateway and never falls back to locally stored credentials. Custom mode uses customConfigID when provided, otherwise it selects the enabled configuration for modelType.
func ResolveVisionAIConfig ¶
ResolveVisionAIConfig resolves the image-message model independently from the ordinary chat capability. Custom mode keeps using the configured LLM; the runtime's conservative model-name check decides whether it can receive image parts. Platform mode requires the explicit vision task route.
func SetPlatformAIProvider ¶
func SetPlatformAIProvider(provider contract.PlatformAIProvider)
SetPlatformAIProvider registers the host-provided system AI gateway for chat, vision, and embedding calls. Passing nil keeps the standalone/custom model behavior unchanged.
func WithPlatformAIRequestPurpose ¶
WithPlatformAIRequestPurpose separates otherwise identical calls belonging to different stages such as retrieval and document indexing.
func WithPlatformAIRequestScope ¶
WithPlatformAIRequestScope binds a persisted business operation identity to platform AI calls. Recreating a scope with the same base during recovery reproduces the same purpose/ordinal request IDs, while one live scope gives every logical upstream call a distinct ordinal.
Types ¶
type ChatCompletionResult ¶
type EmbeddingResult ¶
type ImageInput ¶
type ImageInput struct {
AssetID string
Filename string
MIMEType string
Base64Data string
FileSize int64
}
ImageInput is trusted image data prepared by the conversation asset boundary. The runtime intentionally accepts inline data only; arbitrary customer-provided URLs must never be forwarded to an upstream model.
type ToolDefinition ¶
type ToolLoopResult ¶
type ToolLoopResult struct {
ChatCompletionResult
ToolCalls []ToolCall
}
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
application
|
|
|
readtools
Package readtools executes deterministic, read-only graph tools through the shared Tool Registry boundary.
|
Package readtools executes deterministic, read-only graph tools through the shared Tool Registry boundary. |
|
Package tooling provides the engine-independent tool governance boundary.
|
Package tooling provides the engine-independent tool governance boundary. |