Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenAIOCRAPIRequestTimeout = time.Duration(env.GetIntFromEnvOrDefault("KNOW_OPENAI_OCR_API_REQUEST_TIMEOUT_SECONDS", defaults.ModelAPIRequestTimeoutSeconds)) * time.Second
View Source
var OpenAIOCRAPITimeout = time.Duration(env.GetIntFromEnvOrDefault("KNOW_OPENAI_OCR_API_TIMEOUT_SECONDS", defaults.ModelAPITimeoutSeconds)) * time.Second
Functions ¶
Types ¶
type Choice ¶
type Choice struct { FinishReason string `json:"finish_reason"` Message RespMessage `json:"message"` // e.g. OpenAI provider resp Delta RespMessage `json:"delta"` // e.g. Anthropic/Claude provider StreamResponse }
type ImagePayload ¶
type ImagePayload struct {
URL string `json:"url,omitempty"`
}
type Message ¶
type Message struct { Role string `json:"role"` Content []MessageContent `json:"content"` }
type MessageContent ¶
type MessageContent struct { Type string `json:"type"` Text string `json:"text,omitempty"` ImageURL *ImagePayload `json:"image_url,omitempty"` }
type OpenAIOCR ¶
type OpenAIOCR struct { openai.OpenAIConfig `mapstructure:",squash"` Prompt string MaxTokens *int Concurrency int }
type RespMessage ¶
type RespMessage struct {
Content string `json:"content"`
}
Click to show internal directories.
Click to hide internal directories.