-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
Getting invalid URL post after updating langchain from 0.0.200 to 0.0.267 #10044
Comments
🤖 Hello, Thank you for providing detailed information about the issue you're facing. It seems like the problem might be related to changes made in the In the newer versions of LangChain, the methods in the Here are the relevant code changes: Old version: def _generate(
self,
messages: List[BaseMessage],
stop: Optional[List[str]] = None,
run_manager: Optional[CallbackManagerForLLMRun] = None,
stream: Optional[bool] = None,
**kwargs: Any,
) -> ChatResult:
...
response = self.completion_with_retry(
messages=message_dicts, run_manager=run_manager, **params
)
...
if run_manager:
run_manager.on_llm_new_token(chunk.content, chunk=chunk) New version: async def _agenerate(
self,
messages: List[BaseMessage],
stop: Optional[List[str]] = None,
run_manager: Optional[AsyncCallbackManagerForLLMRun] = None,
stream: Optional[bool] = None,
**kwargs: Any,
) -> ChatResult:
...
response = await acompletion_with_retry(
self, messages=message_dicts, run_manager=run_manager, **params
)
...
if run_manager:
await run_manager.on_llm_new_token(token=chunk.content, chunk=chunk) You can find these changes in the libs/langchain/langchain/chat_models/openai.py file. This change to asynchronous methods might be causing the issue you're experiencing. You might need to adjust your code to handle these asynchronous methods properly. As for the "Invalid URL" error, it could be due to a change in the way the AzureMLEndpointClient is initialized or how the endpoint URL is being passed to it. Please ensure that the endpoint URL is correctly set in either the I hope this helps! If you have any other questions or need further clarification, please let me know. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Hi, @salexln! I'm Dosu, and I'm here to help the LangChain team manage our backlog. I wanted to let you know that we are marking this issue as stale. Based on the information provided, it seems that you encountered an "Invalid URL" error after updating Before we proceed, we would like to confirm if this issue is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on this issue. Otherwise, feel free to close the issue yourself, or the issue will be automatically closed in 7 days. Thank you for your understanding and cooperation. If you have any further questions or concerns, please don't hesitate to ask. Best regards, |
System Info
langchain
- 0.0.267openai
- 0.27.7MacOS 13.4.1 (22F82)
Who can help?
No response
Information
Related Components
Reproduction
This code was working when I used
langchain 0.0.200
(The call is toAzureOpenAI
endpoint)Once I updated
langchain
to0.0.267
, I'm getting this errorThe endpoint itself is working (once I reverted back to
0.0.200
all started to work again)Expected behavior
I except to get an answer from the LLM
The text was updated successfully, but these errors were encountered: