Problem with a deploy, proxy?

Description

When I try to run this code in a virtual machine:
try:
with client.batch as batch:
for data_obj in blocks:
batch.add_data_object(
{
‘context’:data_obj.content,
‘content’: data_obj.content,
‘title’: data_obj.title,
‘page’:data_obj.page_label,
‘document’: str(document),
‘technology’: str(technology)
},
“Context”,
)
except Exception as ex:

I get the next error:
{‘error’: [{‘message’: ‘update vector: send POST request: Post “https://api.openai.com/v1/embeddings”: x509: certificate signed by unknown authority’}]}

This is the docker.compose for the weaviate docker
services:
weaviate:
volumes:
- persist:/var/lib/weaviate
command:
- --host
- 0.0.0.0
- --port
- ‘8888’
- --scheme
- http
image:
semitechnologies/weaviate:1.19.6
ports:
- 8888:8888
restart: on-failure:0
environment:
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-openai’

The virtual machine where I try to deploy have a very restrictive proxy, but is already disconnected and I can access via browser to “https://api.openai.com/v1/embeddings”, but I’m still having that error.

This code work perfectly in my local.
I don’t know what can I do.

Server Setup Information

  • Weaviate Server Version: 1.19,6
  • Deployment Method: docker
  • Multi Node? Number of Running Nodes:
  • Client Language and Version:

Any additional Information

hi @garcia.e ! Welcome to our community :hugs:

So, Weaviate 1.19.6 is farily old. We strongely recommend you upgrading it to latest versions, as a lot has happened in terms of performance improvements and bug fixes.

Also, try using the new python client v4, as it’s more performant and, well, has a way better developer experience than v3 :wink:

With that said, this error is most certainly related to this restrictive proxy as I am pretty sure Open AI embeddings API has not changed since the version you are using.

There is a new feature in recent Weaviate versions that allows you to specify a baseurl, so maybe you can use that to point to a Open AI Proxy server (there are some open sources that can handle this, and use different apikeys, take care of booking for multiple customers, etc), but you will probably have the same issue with your proxy.

Your outbound traffic is probably being intercepted by this proxy server that is using a different, untrusted, certificate.

I believe you will have to work that out with that proxy admin :grimacing: