-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2674 from weaviate/20241008-updates
20241008 updates
- Loading branch information
Showing
8 changed files
with
39 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// START CustomModules | ||
import weaviate, { EmbeddedOptions } from 'weaviate-ts-embedded'; | ||
|
||
const client = weaviate.client( | ||
new EmbeddedOptions({ | ||
env: { | ||
ENABLE_MODULES: "backup-s3,text2vec-openai,text2vec-cohere,text2vec-huggingface,ref2vec-centroid,generative-openai,qna-openai", | ||
}, | ||
}) | ||
); | ||
|
||
await client.embedded.start(); | ||
|
||
// Add your client code here. | ||
|
||
await client.embedded.stop(); | ||
// END CustomModules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,12 @@ | ||
// NOT TESTED TO RUN AS AN END TO END SCRIPT | ||
|
||
// START SimpleInstance | ||
import weaviate, { EmbeddedOptions } from 'weaviate-ts-embedded'; | ||
|
||
const client = weaviate.client(new EmbeddedOptions()); | ||
const client = weaviate.client(new EmbeddedOptions()); | ||
|
||
await client.embedded.start(); | ||
await client.embedded.start(); | ||
|
||
const response = await client.data | ||
.creator() | ||
.withClassName('Wine') | ||
.withProperties({ | ||
name: 'Chardonnay', | ||
description: 'Goes with fish', | ||
}) | ||
.do(); | ||
// Add your client code here. | ||
|
||
console.log(JSON.stringify(response, null, 2)); | ||
await client.embedded.stop(); | ||
// END SimpleInstance | ||
|
||
|
||
|
||
// START CustomModules | ||
import weaviate, { EmbeddedOptions } from 'weaviate-ts-embedded'; | ||
|
||
const client = weaviate.client( | ||
new EmbeddedOptions({ | ||
env: { | ||
ENABLE_MODULES: "backup-s3,text2vec-openai,text2vec-cohere,text2vec-huggingface,ref2vec-centroid,generative-openai,qna-openai", | ||
}, | ||
}) | ||
); | ||
// END CustomModules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,29 @@ | ||
#NOT TESTED AS A RUNNING END TO END SCRIPT | ||
|
||
# START SimpleInstance | ||
import weaviate | ||
from weaviate.embedded import EmbeddedOptions | ||
|
||
client = weaviate.Client( | ||
embedded_options=EmbeddedOptions() | ||
embedded_options=EmbeddedOptions() | ||
) | ||
|
||
data_obj = { | ||
"name": "Chardonnay", | ||
"description": "Goes with fish" | ||
"name": "Chardonnay", | ||
"description": "Goes with fish" | ||
} | ||
|
||
client.data_object.create(data_obj, "Wine") | ||
# END SimpleInstance | ||
client.close() | ||
|
||
|
||
# START CustomModules | ||
import weaviate | ||
from weaviate.embedded import EmbeddedOptions | ||
|
||
client = weaviate.Client( | ||
embedded_options=EmbeddedOptions( | ||
additional_env_vars={ | ||
"ENABLE_MODULES": | ||
"backup-s3,text2vec-openai,text2vec-cohere,text2vec-huggingface,ref2vec-centroid,generative-openai,qna-openai"} | ||
) | ||
embedded_options=EmbeddedOptions( | ||
additional_env_vars={ | ||
"ENABLE_MODULES": | ||
"backup-s3,text2vec-openai,text2vec-cohere,text2vec-huggingface,ref2vec-centroid,generative-openai,qna-openai"} | ||
) | ||
) | ||
# END CustomModules | ||
client.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters