You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a very descriptive title to this question.
I searched the LangChain documentation with the integrated search.
I used the GitHub search to find a similar question and didn't find it.
Commit to Help
I commit to help with one of those options 👆
Example Code
N/A
Description
I'm using the ChatOpenAI API. My company got us to redirect all openai requests to a new URL and I'm now getting 403 errors. I narrowed it down to the URL in the request not accepting "/chat/completions" that's tacked on by the Langchain framework. Is there anything I can do? Can I set one parameter (which I can't find) so that '/chat/completions' is not tacked on?
this works 'manually'
Request: POST https://company_url.com/xyz
with the /chat/completions' that's tacked on by the framework, but now I'm getting 403 errors
Request: POST https://company_url.com/xyz/chat/completions
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Checked other resources
Commit to Help
Example Code
Description
I'm using the ChatOpenAI API. My company got us to redirect all openai requests to a new URL and I'm now getting 403 errors. I narrowed it down to the URL in the request not accepting "/chat/completions" that's tacked on by the Langchain framework. Is there anything I can do? Can I set one parameter (which I can't find) so that '/chat/completions' is not tacked on?
llm = ChatOpenAI(model_name = 'gpt-4o-mini', temperature=0, openai_api_base= os.getenv("OPENAI_API_BASE"), api_key = os.getenv("OPENAI_API_KEY"), http_client=http_client, http_async_client=http_async_client)
this works 'manually'
Request: POST https://company_url.com/xyz
with the /chat/completions' that's tacked on by the framework, but now I'm getting 403 errors
Request: POST https://company_url.com/xyz/chat/completions
System Info
langchain==0.3.25
langchain-community==0.3.24
langchain-core==0.3.64
langchain-openai==0.3.21
langchain-text-splitters==0.3.8
Beta Was this translation helpful? Give feedback.
All reactions