Simple RAG Search Example occurs error #16764
Replies: 3 comments 2 replies
-
🤖 Hey @JackYinpei! Good to see you back in the LangChain world. Let's get those gears turning and solve this together! 🔧👍 Based on the error message you provided, it seems like the error is related to the Here's the relevant code from the # Check OPENAI_KEY for backwards compatibility.
# TODO: Remove OPENAI_API_KEY support to avoid possible conflict when using
# other forms of azure credentials.
values["openai_api_key"] = (
values["openai_api_key"]
or os.getenv("AZURE_OPENAI_API_KEY")
or os.getenv("OPENAI_API_KEY")
) This code is trying to get the value of Please ensure that you have set the import os
os.environ["OPENAI_API_KEY"] = "your-api-key-here" Replace If you've already done this and are still encountering the error, it's possible that there might be an issue with your OpenAI API key. You might want to check if your key is still valid or if there are any restrictions on it that might be causing the issue. If the issue persists, please provide more details about the error message or any other relevant information that could help in diagnosing the issue. 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. |
Beta Was this translation helpful? Give feedback.
-
Estou tendo o seguite problema |
Beta Was this translation helpful? Give feedback.
-
AttributeError Traceback (most recent call last) retriever = vectorstore.as_retriever() Question: {question} ... AttributeError: module 'torch' has no attribute 'Tensor' |
Beta Was this translation helpful? Give feedback.
-
Checked other resources
Commit to Help
Example Code
Description
I'm running the start code in
https://python.langchain.com/docs/expression_language/get_started
I am reading the startup code in this link, and when I was executing the startup code related to RAG in this link, I encountered a bug. I hope to output similar results as the example code in this article when running the above code, but this error occurred. I don't know how to solve it
Here is the error info
System Info
PS E:\work\langchain> python -m langchain_core.sys_info
System Information
Package Information
Packages not installed (Not Necessarily a Problem)
The following packages were not found:
Beta Was this translation helpful? Give feedback.
All reactions