Documentation
¶
Overview ¶
Package apihelper provides a small set of shared HTTP helpers reused by the scheduler LLM time-parser, the RAG ask path, and the RAG extractor. It centralizes the base-URL override, a shared proxy-aware HTTP client, and a response-truncation utility so these callers do not duplicate the HTTP boilerplate.
(The former private-protocol APICall helper was removed in WP-2.6 along with the multimodal tools; only the generic Client/BaseURL/Truncate utilities remain, borrowed by the /chat/completions callers above.)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BaseURL = defaultBaseURL
BaseURL is the API root for direct /chat/completions calls made by the scheduler time-parser and RAG ask. It's a var (not a const) so a private deployment or proxy can override it at boot via SetBaseDomain.
var Client = &http.Client{Timeout: 120 * time.Second}
Client is a shared HTTP client for the direct /chat/completions callers.
Functions ¶
func SetBaseDomain ¶
func SetBaseDomain(base string)
SetBaseDomain overrides the API base URL used by the direct /chat/completions callers. Pass the full base (e.g. "https://api.example.com/v1"); an empty value resets to the default. boot.go derives the value from [cowork] fast_llm_base_domain so a private deployment or proxy can redirect these calls without code changes.
Types ¶
This section is empty.