getApiBaseFromConfig
Agent Runtimes / chat/utils / getApiBaseFromConfig
Function: getApiBaseFromConfig()
getApiBaseFromConfig(
configEndpoint):string
Defined in: utils/utils.ts:226
Derives the API base URL from a config endpoint URL.
The config endpoint may be {base}/api/v1/config (from agentRuntimeConfig)
or {base}/api/v1/configure (from the Chat component). This function
strips the trailing path segment to yield {base}/api/v1.
Parameters
configEndpoint
string
Full config endpoint URL.
Returns
string
The API base URL without the trailing config segment.