mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-04-07 00:15:23 +02:00
fix: COHERE_API_URL
This commit is contained in:
parent
d0c0602edb
commit
1ddc3777b6
4 changed files with 8 additions and 8 deletions
|
|
@ -814,8 +814,8 @@ OPENWEATHER_API_KEY=
|
|||
# JINA_API_KEY=your_jina_api_key
|
||||
# or
|
||||
# COHERE_API_KEY=your_cohere_api_key
|
||||
# Optional: Custom Cohere API base URL (defaults to https://api.cohere.ai/v1)
|
||||
# COHERE_BASE_URL=http://litellm:8000/v1
|
||||
# Optional: Custom Cohere API URL (defaults to https://api.cohere.ai/v1)
|
||||
# COHERE_API_URL=http://litellm:8000/v1
|
||||
|
||||
#======================#
|
||||
# MCP Configuration #
|
||||
|
|
|
|||
|
|
@ -1824,10 +1824,10 @@ export enum ForkOptions {
|
|||
export const CohereConstants = {
|
||||
/**
|
||||
* Cohere API Endpoint, for special handling
|
||||
* Uses COHERE_BASE_URL environment variable if set, otherwise defaults to official API
|
||||
* Uses COHERE_API_URL environment variable if set, otherwise defaults to official API
|
||||
*/
|
||||
get API_URL(): string {
|
||||
return process.env.COHERE_BASE_URL || 'https://api.cohere.ai/v1';
|
||||
return process.env.COHERE_API_URL || 'https://api.cohere.ai/v1';
|
||||
},
|
||||
/**
|
||||
* Role for "USER" messages
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export const webSearchAuth = {
|
|||
cohere: {
|
||||
cohereApiKey: 1 as const,
|
||||
/** Optional (0) */
|
||||
cohereBaseUrl: 0 as const,
|
||||
cohereApiUrl: 0 as const,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
@ -76,7 +76,7 @@ export function loadWebSearchConfig(
|
|||
const jinaApiKey = config?.jinaApiKey ?? '${JINA_API_KEY}';
|
||||
const jinaApiUrl = config?.jinaApiUrl ?? '${JINA_API_URL}';
|
||||
const cohereApiKey = config?.cohereApiKey ?? '${COHERE_API_KEY}';
|
||||
const cohereBaseUrl = config?.cohereBaseUrl ?? '${COHERE_BASE_URL}';
|
||||
const cohereApiUrl = config?.cohereApiUrl ?? '${COHERE_API_URL}';
|
||||
const safeSearch = config?.safeSearch ?? SafeSearchTypes.MODERATE;
|
||||
|
||||
return {
|
||||
|
|
@ -85,7 +85,7 @@ export function loadWebSearchConfig(
|
|||
jinaApiKey,
|
||||
jinaApiUrl,
|
||||
cohereApiKey,
|
||||
cohereBaseUrl,
|
||||
cohereApiUrl,
|
||||
serperApiKey,
|
||||
searxngApiKey,
|
||||
firecrawlApiKey,
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export type TWebSearchKeys =
|
|||
| 'jinaApiKey'
|
||||
| 'jinaApiUrl'
|
||||
| 'cohereApiKey'
|
||||
| 'cohereBaseUrl';
|
||||
| 'cohereApiUrl';
|
||||
|
||||
export type TWebSearchCategories =
|
||||
| SearchCategories.PROVIDERS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue