Been using OpenAI embeddings with an embedded Weaviate instance just fine. However, I just launched a local deployment with Docker and I’m now getting the following error:
weaviate.exceptions.UnexpectedStatusCodeError: Object was not added!
Unexpected status code: 500, with response body:
{'error':
[{'message': 'update vector: send POST request: Post "https://api.openai.com/v1/embeddings": dial tcp 162.159.140.245:443: connect: connection refused'}]
}.
This is my docker-compose, mostly just copied from the Weaviate website.
---
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- "8080"
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.26.6
ports:
- 8080:8080
- 50051:50051
volumes:
- weaviate_data:/var/lib/weaviate
restart: on-failure:0
environment:
QUERY_DEFAULTS_LIMIT: 25
PERSISTENCE_DATA_PATH: "/var/lib/weaviate"
DEFAULT_VECTORIZER_MODULE: "none"
ENABLE_API_BASED_MODULES: "true"
CLUSTER_HOSTNAME: "node1"
ENABLE_MODULES: "text2vec-openai"
# Enables API key authentication.
AUTHENTICATION_APIKEY_ENABLED: "true"
# List one or more keys, separated by commas. Each key corresponds to a specific user identity below.
AUTHENTICATION_APIKEY_ALLOWED_KEYS: "[API_KEY]"
# List one or more user identities, separated by commas. Each identity corresponds to a specific key above.
AUTHENTICATION_APIKEY_USERS: "[My email]"
volumes:
weaviate_data:
It works fine with embedded Weaviate so it shouldn’t be an issue with the OpenAI API key. Running ping to openai.com in the docker container works so I don’t think it’s an internet connection issue.
Any help would be appreciated, thanks!