Closed gregbayer closed 1 month ago
The V3 docs say the api key should be passed as a string when connecting in custom mode. See here:
https://weaviate.io/developers/weaviate/client-libraries/typescript/typescript-v3
const client = await weaviate.client({ rest: { host: 'WEAVIATE_INSTANCE_HOST_NAME', port: 8080, secure: true }, grpc: { host: 'WEAVIATE_INSTANCE_HOST_NAME', port: 50051, secure: true }, auth: { apiKey: process.env.WEAVIATE_API_KEY || '' }, headers: { 'X-OpenAI-Api-Key': process.env.OPENAI_API_KEY || '' } } ) console.log(client)
However, I was only able to get the client to connect when wrapping the api key string like this. Otherwise the client validation code drops the key.
auth: { apiKey: new weaviate.ApiKey(process.env.WEAVIATE_API_KEY || '') }
Hi @gregbayer, thanks for calling this one out! I think this is a regression so I'll add back support for detecting a string as an API key in the next RC release
Fixed in v3.0.0-rc.3
v3.0.0-rc.3
The V3 docs say the api key should be passed as a string when connecting in custom mode. See here:
https://weaviate.io/developers/weaviate/client-libraries/typescript/typescript-v3
However, I was only able to get the client to connect when wrapping the api key string like this. Otherwise the client validation code drops the key.