Closed meithon closed 1 month ago
π€
Hello @rneithon! Nice to see you back here. I hope your project is coming along well. Let's take a look at this issue you've encountered.
The "Not Found" error you're encountering is likely due to the Weaviate instance not being able to find the resource you're trying to access. This could be due to a number of reasons, such as the Weaviate instance not being properly set up, the specified index not existing, or the Weaviate instance not being reachable at the specified host and port.
In your code, you're trying to create a Weaviate client and use it to add documents to a Weaviate store. The error is thrown when the WeaviateStore.fromDocuments
function is called. This function tries to add the provided documents to the Weaviate index specified in the indexName
argument. If this index does not exist in the Weaviate instance, or if the Weaviate instance is not reachable, a "Not Found" error could be thrown.
Here's how you can troubleshoot this issue:
Check the Weaviate instance: Make sure that the Weaviate instance is properly set up and running. You can do this by trying to access the Weaviate instance directly using its host and port. If you're running Weaviate locally, you can try accessing http://localhost:8080
in your browser.
Check the index: Make sure that the index you're trying to add documents to exists in the Weaviate instance. You can do this by checking the Weaviate instance's schema. If the index does not exist, you'll need to create it before you can add documents to it.
Check the host and port: Make sure that the host and port you're using to create the Weaviate client match the host and port of the Weaviate instance. In your code, you're using the WEAVIATE_HOST
environment variable to specify the host and port. Make sure that this environment variable is correctly set to the host and port of the Weaviate instance.
If you've checked all of these and you're still encountering the error, it would be helpful if you could provide more information about your setup. Specifically, it would be helpful to know how your Weaviate instance is set up, what the WEAVIATE_HOST
environment variable is set to, and whether the index you're trying to add documents to exists in the Weaviate instance.
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.
I use this docker-compose.yml
version: "3.4"
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- "8080"
- --scheme
- http
image: semitechnologies/weaviate:1.23.3
env_file: .env
ports:
- 8080:8080
- 50051:50051
volumes:
- weaviate_data:/var/lib/weaviate
restart: on-failure:0
environment:
QNA_INFERENCE_API: "http://qna-transformers:8080"
NER_INFERENCE_API: "http://ner-transformers:8080"
SPELLCHECK_INFERENCE_API: "http://text-spellcheck:8080"
OPENAI_APIKEY: $OPENAI_API_KEY
QUERY_DEFAULTS_LIMIT: 25
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: "true"
PERSISTENCE_DATA_PATH: "/var/lib/weaviate"
DEFAULT_VECTORIZER_MODULE: "text2vec-openai"
ENABLE_MODULES: "text2vec-openai,qna-transformers,ner-transformers,text-spellcheck,ref2vec-centroid,generative-openai"
CLUSTER_HOSTNAME: "node1"
qna-transformers:
image: semitechnologies/qna-transformers:distilbert-base-uncased-distilled-squad
environment:
ENABLE_CUDA: "0"
ner-transformers:
image: semitechnologies/ner-transformers:dbmdz-bert-large-cased-finetuned-conll03-english
environment:
ENABLE_CUDA: "0"
text-spellcheck:
image: semitechnologies/text-spellcheck-model:pyspellchecker-en
volumes:
weaviate_data:
@rneithon awesome
I executed this code.
Returned this error
What was not found for this? And how can this be resolved?