Comments (2)
Hi, yes, HTTPS is generally required for most use today. You'll need to either use a local proxy or disable checks as you've found without it, generally.
The Typescript client works with both JS and TS. You should be be able to use either with React 18. Please give that a shot and see if your issues remain.
I'm going to close this issue as the client is no longer maintained.
from weaviate-javascript-client.
Regarding the query for the TS client, you may be confusing Weaviate API key vs OpenAI keys. The below config will connect with a Weaviate API key and OpenAI key for the OpenAI module:
const weaviate = require('weaviate-ts-client');
// Instantiate the client with the auth config
const client = weaviate.client({
scheme: 'https',
host: "some-endpoint.weaviate.network",
apiKey: new weaviate.ApiKey("YOUR-WEAVIATE-API-KEY"), // Replace w/ your API Key for the Weaviate instance
headers: {"X-OpenAI-Api-Key": "<THE-KEY>"}
});
For your questions around CORS. Currently the header X-OpenAI-Api-Key
will not be allowed by the browser unless explicitly allowed via CORS due to browser security settings. We have an open issue to add custom CORS settings to Weaviate weaviate/weaviate#2486. A current workaround would be to use NGINX or create a simple wrapper api around Weaviate which would also give you the benefit of keeping the OpenAI key hidden from users.
from weaviate-javascript-client.
Related Issues (20)
- Error: Cannot find module './httpClient.js' HOT 3
- ERROR - GENERATIVE AI JS COMPONENT HOT 2
- Add support for types. HOT 1
- Add JS/TS formatter
- Add JS/TS linter
- Add support for generative openai module HOT 1
- Complete TS migration type conversions HOT 2
- Hybrid, Selected properties only
- how to include the library directly in the browser? HOT 1
- Add support for rerank parameter in ask argument
- Add support for object check request
- ERROR in ./node_modules/weaviate-client/lib.js HOT 1
- Add support for where argument in Aggregate
- Add support for /v1/schema/{className}
- Support of Weaviate 1.14.1 still missing (in referencesBatcher)? HOT 3
- referencesBatcher is cumbersome to use: new function suggested HOT 4
- Automatically transmit API keys found in the environment variables along with the request
- security warning from isomorphic-fetch HOT 4
- Possibility to update class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weaviate-javascript-client.