mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
fix(OpenAIClient/PluginsClient): allow non-v1 reverse proxy, handle "v1/completions" reverse proxy (#1029)
* fix(OpenAIClient): handle completions request in reverse proxy, also force prompt by env var * fix(reverseProxyUrl): allow url without /v1/ but add server warning as it will not be compatible with plugins * fix(ModelService): handle reverse proxy without v1 * refactor: make changes cleaner * ci(OpenAIClient): add tests for OPENROUTER_API_KEY, FORCE_PROMPT, and reverseProxyUrl handling in setOptions
This commit is contained in:
parent
d61e44742d
commit
2dd545eaa4
5 changed files with 80 additions and 14 deletions
|
|
@ -117,6 +117,12 @@ DEBUG_OPENAI=false # Set to true to enable debug mode for the OpenAI endpoint
|
|||
# https://github.com/waylaidwanderer/node-chatgpt-api#using-a-reverse-proxy
|
||||
# OPENAI_REVERSE_PROXY=
|
||||
|
||||
# (Advanced) Sometimes when using Local LLM APIs, you may need to force the API
|
||||
# to be called with a `prompt` payload instead of a `messages` payload; to mimic the
|
||||
# a `/v1/completions` request instead of `/v1/chat/completions`
|
||||
# This may be the case for LocalAI with some models. To do so, uncomment the following:
|
||||
# OPENAI_FORCE_PROMPT=true
|
||||
|
||||
##########################
|
||||
# OpenRouter (overrides OpenAI and Plugins Endpoints):
|
||||
##########################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue