Schema shows both Azure OpenAI and openAI endpoints

Description

client set with Azure openAI key

client = weaviate.Client(
url= WEAVIATE_DB_URL, # Replace with your endpoint
auth_client_secret=weaviate.auth.AuthApiKey(api_key=WEAVIATE_API_KEY), # Replace w/ your Weaviate instance API key
additional_headers = {
“X-Azure-Api-Key”: “…”
}
)

schema has the following:

    {
        'name': 'content',
        'dataType': ['text']
    },
],
'vectorizer': 'text2vec-openai',
'moduleConfig': {
    'tect2vec-openai': {
        "resourceName": "xxxx",
        "deploymentId": "text-embedding-ada-002",
        "baseURL": "https://xxxx.openai.azure.com/", # azure end point
        "vectorizeClassName" : False,
        "dimensions": 1536,  # Parameter only applicable for `v3` model family and newer
        "type": "text"

    }
},

}

printing the schema shows the following

   "preset": "en",
      "removals": null
    }
  },
  "moduleConfig": {
    "tect2vec-openai": {
      "baseURL": "https://sridiyer-ai-us-west-aiservices-1506555731.openai.azure.com/",
      "deploymentId": "text-embedding-ada-002",
      "dimensions": 1536,
      "resourceName": "xxxx",
      "type": "text",
      "vectorizeClassName": false
    },
    "text2vec-openai": {
      "baseURL": "https://api.openai.com",
      "model": "ada",
      "vectorizeClassName": true
    }
  },

baseURL for text2vec-openai takes the openaI url not the azure baseURL

Server Setup Information

weaviate cloud service (on your cloud)

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

Any additional Information

how to make the client access Azure OpenAI not the real OpenAI. thanks

Hi!

Welcome to our community :hugs:

It should be using Azure OpenAi… don’t you see activities on it’s panel?

As you never passed the OpenAI APIKEY, and passes all the necessary data to use openai with azure on the client, Weaviate should be using Azure.

Thanks!

Hi, Thanks so much. Stupid me made a typo. In the moduleConfig I put the name of the model as "“tect2vec-openai”. teCt not teXt. once I fixed the typo it is working fine!!! (wish I had caught the typo a few hours before spending all this time trying 4.* / 3.* clients, posting here, etc.