Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy setting for Azure OpenAI #95

Open
JulianHandrup opened this issue Nov 8, 2024 · 1 comment · May be fixed by #97
Open

Proxy setting for Azure OpenAI #95

JulianHandrup opened this issue Nov 8, 2024 · 1 comment · May be fixed by #97
Assignees

Comments

@JulianHandrup
Copy link

JulianHandrup commented Nov 8, 2024

Hello and thanks for the great work so far,

we're running librechat on docker using the provided images.
We've noticed that the rag_api is having issues downloading "/encodings/cl100k_base.tiktoken" from "openaipublic.blob.core.windows.net" because it's not using our proxy server.
After searching for a bit we found out that there's a setting for OpenAI that let's you define a proxy but not for other embeddings.
https://github.com/danny-avila/rag_api/blob/main/config.py#L177-L194

Please add the possibility to configure the Proxy for at least AzureOpenAI as well.

EDIT:
Or is there another way to configure rag_api to use a proxy for loading the embeddings for AzureOpenAI?
If so, please let me know :)
I'm not familiar with Python/Langchain and all this, so I'm a bit confused.
-- End edit

Here's the log from the ragapi container:

LOGFILE rag_api ==================================================================================

USER_AGENT environment variable not set, consider setting it to identify your requests.
2024-11-08 08:50:55,373 - root - INFO - Initialized embeddings of type: <class 'langchain_openai.embeddings.azure.AzureOpenAIEmbeddings'>
/app/store_factory.py:22: LangChainPendingDeprecationWarning: Please use JSONB instead of JSON for metadata. This change will allow for more efficient querying that involves filtering based on metadata.Please note that filtering operators have been changed when using JSOB metadata to be prefixed with a $ sign to avoid name collisions with columns. If you're using an existing database, you will need to create adb migration for your metadata column to be JSONB and update your queries to use the new operators. 
  return AsyncPgVector(
2024-11-08 08:50:55,446 - uvicorn.error - INFO - Started server process [1]
2024-11-08 08:50:55,446 - uvicorn.error - INFO - Waiting for application startup.
2024-11-08 08:50:55,446 - uvicorn.error - INFO - Application startup complete.
2024-11-08 08:50:55,446 - uvicorn.error - INFO - Uvicorn running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
2024-11-08 08:53:36,089 - root - ERROR - HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7fd60796abc0>, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))
@FinnConnor FinnConnor self-assigned this Nov 11, 2024
@FinnConnor
Copy link
Collaborator

@JulianHandrup thanks for bringing this up.

Added relevant env variables here #97

@FinnConnor FinnConnor linked a pull request Nov 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants