Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs need updating to reflect api key requirements in ^3.0.0-beta.23 #137

Closed
gregbayer opened this issue May 8, 2024 · 2 comments
Closed

Comments

@gregbayer
Copy link

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 || '')
}
@tsmith023
Copy link
Contributor

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

@tsmith023
Copy link
Contributor

Fixed in v3.0.0-rc.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants