Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _includes/code/csharp/QuickstartTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static async Task FullQuickstartWorkflowTest()
Property.Text("category"),
],
VectorConfig = Configure.Vector("default", v => v.Text2VecWeaviate()), // Configure the Weaviate Embeddings integration
GenerativeConfig = Configure.Generative.Cohere(), // Configure the Cohere generative AI integration
GenerativeConfig = Configure.Generative.OpenAI(), // Configure the OpenAI generative AI integration
}
);
// highlight-end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func Test_ManageDataReadAllObjects(t *testing.T) {
t.Run("Read all objects", func(t *testing.T) {
// CursorExample // Retrieve data

// START ReadAllProps
sourceClient, err := weaviate.NewClient(weaviate.Config{
Scheme: "https",
Host: "WEAVIATE_INSTANCE_URL", // Replace WEAVIATE_INSTANCE_URL with your instance URL
Expand Down Expand Up @@ -59,6 +60,7 @@ func Test_ManageDataReadAllObjects(t *testing.T) {
}
return get.Do(context.Background())
}
// END ReadAllProps
// Use this function to retrieve data

// START FetchClassDefinition
Expand Down
19 changes: 10 additions & 9 deletions _includes/code/howto/go/docs/model-providers/2-usage-text/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ func main() {
"title_vector": {
Vectorizer: map[string]interface{}{
"text2vec-google": map[string]interface{}{
"project_id": "<google-cloud-project-id>",
"model_id": "gemini-embedding-001", // (Optional) To manually set the model ID
"projectId": "<google-cloud-project-id>",
"modelId": "gemini-embedding-001", // (Optional) To manually set the model ID
},
},
},
Expand Down Expand Up @@ -321,8 +321,9 @@ func main() {
"title_vector": {
Vectorizer: map[string]interface{}{
"text2vec-google": map[string]interface{}{
"properties": []string{"title"},
"model_id": "gemini-embedding-001", // (Optional) To manually set the model ID
"properties": []string{"title"},
"apiEndpoint": "generativelanguage.googleapis.com",
"modelId": "gemini-embedding-001", // (Optional) To manually set the model ID
},
Comment on lines 323 to 327
},
},
Expand Down Expand Up @@ -353,11 +354,11 @@ func main() {
VectorConfig: map[string]models.VectorConfig{
"title_vector": {
Vectorizer: map[string]interface{}{
"text2vec-aws": map[string]interface{}{
"properties": []string{"title"},
"project_id": "<google-cloud-project-id>", // Required for Vertex AU
"model_id": "textembedding-gecko@latest", // (Optional) To manually set the model ID
"api_endpoint": "<google-api-endpoint>", // (Optional) To manually set the API endpoint
"text2vec-google": map[string]interface{}{
"properties": []string{"title"},
"projectId": "<google-cloud-project-id>", // Required for Vertex AI
"modelId": "textembedding-gecko@latest", // (Optional) To manually set the model ID
"apiEndpoint": "<google-api-endpoint>", // (Optional) To manually set the API endpoint
},
},
},
Expand Down
10 changes: 5 additions & 5 deletions _includes/code/howto/search.similarity.mmr.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
response = collection.query.near_vector(
near_vector=base_vec,
limit=20,
selection=Diversity.MMR(
diversity_selection=Diversity.mmr(
limit=5,
balance=0.5,
),
Expand Down Expand Up @@ -75,7 +75,7 @@
response = collection.query.near_vector(
near_vector=query_vector,
limit=20,
selection=Diversity.MMR(
diversity_selection=Diversity.mmr(
limit=5,
balance=0.5,
),
Expand All @@ -98,21 +98,21 @@
response_diverse = collection.query.near_vector(
near_vector=base_vec,
limit=20,
selection=Diversity.MMR(limit=5, balance=0.0),
diversity_selection=Diversity.mmr(limit=5, balance=0.0),
)

# Balanced — equal weight on relevance and diversity
response_balanced = collection.query.near_vector(
near_vector=base_vec,
limit=20,
selection=Diversity.MMR(limit=5, balance=0.5),
diversity_selection=Diversity.mmr(limit=5, balance=0.5),
)

# Pure relevance — equivalent to standard vector search
response_relevant = collection.query.near_vector(
near_vector=base_vec,
limit=20,
selection=Diversity.MMR(limit=5, balance=1.0),
diversity_selection=Diversity.mmr(limit=5, balance=1.0),
)
# END MMRBalanceExamples

Expand Down
2 changes: 1 addition & 1 deletion _includes/code/java-v6/src/test/java/QuickstartTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void testCreateCollection() throws Exception {
collectionName,
col -> col
.vectorConfig(VectorConfig.text2vecWeaviate()) // Configure the Weaviate Embeddings integration
.generativeModule(Generative.cohere()) // Configure the Cohere generative AI integration
.generativeModule(Generative.openai()) // Configure the OpenAI generative AI integration
);
CollectionHandle<Map<String, Object>> questions = client.collections.use(collectionName);
// highlight-end
Expand Down
2 changes: 1 addition & 1 deletion _includes/code/quickstart/quickstart.create_collection.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ curl -X POST \
"vectorizer": "text2vec-weaviate",
"moduleConfig": {
"text2vec-weaviate": {},
"generative-cohere": {}
"generative-openai": {}
}
}' \
"$WEAVIATE_URL/v1/schema"
Expand Down
4 changes: 2 additions & 2 deletions _includes/code/quickstart/quickstart.query.rag.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import JavaV6Code from "!!raw-loader!/_includes/code/java-v6/src/test/java/Quick
# Best practice: store your credentials in environment variables
# export WEAVIATE_URL="YOUR_INSTANCE_URL" # Your Weaviate instance URL
# export WEAVIATE_API_KEY="YOUR_API_KEY" # Your Weaviate instance API key
# export COHERE_API_KEY="YOUR_API_KEY" # Your Cohere API key
# export OPENAI_API_KEY="YOUR_API_KEY" # Your OpenAI API key

echo '{
"query": "{
Expand Down Expand Up @@ -92,7 +92,7 @@ echo '{
-X POST \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $WEAVIATE_API_KEY" \
-H "X-Cohere-Api-Key: $COHERE_API_KEY" \
-H "X-OpenAI-Api-Key: $OPENAI_API_KEY" \
-d @- \
$WEAVIATE_URL/v1/graphql
```
Expand Down
1 change: 0 additions & 1 deletion _includes/feature-notes/v137-preview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

This is a preview feature. The API may change in future releases.

- **Python client**: Support is not yet in a released `weaviate-client`. Coming in the next release (tracked in [PR #1997](https://github.com/weaviate/weaviate-python-client/pull/1997)).
- **Multi-node clusters**: MMR reranking may produce suboptimal results for collections whose shards are distributed across multiple nodes, since each shard returns its own candidate set before the coordinator reranks them. We are actively working on improving this.

:::
6 changes: 3 additions & 3 deletions docs/cloud/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Notes:
## Requirements

- A [Weaviate Cloud account](./platform/create-account.mdx).
- In order to perform Retrieval Augmented Generation (RAG) in the last step, you will need a [Cohere](https://dashboard.cohere.com/) account. You can use a free Cohere trial API key. If you have another preferred [model provider](/weaviate/model-providers), you can use that instead of Cohere.
- In order to perform Retrieval Augmented Generation (RAG) in the last step, you will need an [OpenAI](https://platform.openai.com/) account and an OpenAI API key. If you have another preferred [model provider](/weaviate/model-providers), you can use that instead of OpenAI.

<hr />

Expand Down Expand Up @@ -386,9 +386,9 @@ import QueryRAG from "/_includes/code/quickstart/quickstart.query.rag.mdx";

<QueryRAG />

:::info Cohere API key in the header
:::info OpenAI API key in the header

Note that this code includes an additional header for the Cohere API key. Weaviate uses this key to access the Cohere generative AI model and perform retrieval augmented generation (RAG).
Note that this code includes an additional header for the OpenAI API key. Weaviate uses this key to access the OpenAI generative AI model and perform retrieval augmented generation (RAG).

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/deploy/configuration/env-vars/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ import APITable from '@site/src/components/APITable';
| `OBJECTS_TTL_DELETE_SCHEDULE` | Schedule for deleting expired objects. Accepts standard 5-field cron format, 6-field (with seconds), 7-field (with seconds and year), descriptors (`@yearly`, `@monthly`, `@weekly`, `@daily`, `@hourly`), or hash expressions. Default: `""` (disabled) <br/>Added in `v1.36` | `string - cron format` | `0 */6 * * *` (every 6 hours) |
| `OBJECTS_TTL_PAUSE_DURATION` | How long to pause the TTL deletion process between batches. Longer pauses reduce resource pressure but slow down cleanup. If `0` there is no pause. Can be modified at runtime. Default: `1m` <br/>Added in `v1.36` | `string - duration` | `20s`, `2m` |
| `OBJECTS_TTL_PAUSE_EVERY_NO_BATCHES` | Number of batch deletions to process before pausing. With the default batch size of 10,000, a pause occurs every 100,000 deleted objects. If `0` there is no pause. Can be modified at runtime. Default: `10` <br/>Added in `v1.36` | `string - number` | `3` |
| `OPERATIONAL_MODE` | Sets the [mode of operation](../status.md#operational-modes) for the instance. Options: `READ_WRITE` (default), `READ_ONLY`, `WRITE_ONLY`, `SCALE_OUT`. Limits available operations based on the mode selected. | `string` | `READ_WRITE` |
| `OPERATIONAL_MODE` | Sets the [mode of operation](../status.md#operational-modes) for the instance, limiting the available operations based on the mode selected. Options: `ReadWrite` (default), `ReadOnly`, `WriteOnly`, `ScaleOut`. These values are case-sensitive and matched exactly. An unrecognized value (such as `READ_ONLY`) silently falls back to the default `ReadWrite`, without a warning or an error, so a node you intended to restrict stays fully writable. | `string` | `ReadWrite` |
| `ORIGIN` | Set the http(s) origin for Weaviate | `string - HTTP origin` | `https://my-weaviate-deployment.com` |
| `PERSISTENCE_DATA_PATH` | Path to the Weaviate data store.<br/>[Note about file systems and performance](/weaviate/concepts/resources.md#file-system). | `string - file path` | `/var/lib/weaviate` <br/> Defaults to `./data`|
| `PERSISTENCE_HNSW_DISABLE_SNAPSHOTS` | If set, [HNSW snapshotting](/weaviate/concepts/storage.md#persistence-and-crash-recovery) will be disabled. Default: `false` (enabled) as of `v1.36`; `true` (disabled) in `v1.31`–`v1.35`<br/>Added in `v1.31` | `boolean` | `false` |
Expand Down
16 changes: 13 additions & 3 deletions docs/deploy/faqs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ To confirm and identify the issue, you'll want to first run the same query multi

#### Resolving the issue

Check your settings to check if you have asynchronous replication enabled. If `async_replication_disabled` is set to "true" then you'll need to set that variable to "false." Once it is enabled, the logs will show messages that indicate successful peers checks and synchronization for the nodes.
Check whether asynchronous replication is enabled. If `ASYNC_REPLICATION_DISABLED` is set to `true`, set it to `false`. Once async replication is enabled, the logs will show successful peer checks and node synchronization.

</details>

Expand All @@ -51,11 +51,21 @@ Check your settings to check if you have asynchronous replication enabled. If `a

#### Identifying the issue

To confirm and identify the issue, you'll want to first run the same query multiple times to confirm that the results are inconsistent. If the inconsistent results are persisting, then you probably have asynchronous replication disabled for your deployment.
Start with the logs of a node that is failing to join. A membership problem reads differently from a data problem: you'll see repeated attempts to contact the founding member, gossip timeouts, or Raft messages about an election that never settles on a leader. A node in this state can still pass its own health checks, so if the <SkipLink href="/weaviate/api/rest#tag/well-known/GET/.well-known/live">live endpoint</SkipLink> answers while the node stays outside the cluster, the process is healthy and the problem is membership.

To confirm it, query the <SkipLink href="/weaviate/api/rest#tag/cluster/get/cluster/statistics">`/v1/cluster/statistics`</SkipLink> endpoint. If it reports fewer nodes than you expect, or the top-level `synchronized` field is `false`, then your cluster has not reached consensus.

#### Resolving the issue

Check your settings to check if you have asynchronous replication enabled. If `async_replication_disabled` is set to "true" then you'll need to set that variable to "false." Once it is enabled, the logs will show messages that indicate successful peers checks and synchronization for the nodes. Additionally, test the <SkipLink href="/weaviate/api/rest#tag/well-known/GET/.well-known/live">live and ready REST endpoints</SkipLink>. and check the network configuration of the nodes.
Work outward from each node's own identity to the network between the nodes.

- Point every joining node at the founding member with [`CLUSTER_JOIN`](/deploy/configuration/env-vars/index.md#CLUSTER_JOIN). The value is the service name and gossip port of that founding member, such as `weaviate-node-1:7100`, and every joining node must name the same one.
- Set [`CLUSTER_HOSTNAME`](/deploy/configuration/env-vars/index.md#CLUSTER_HOSTNAME) explicitly on every node. If you leave the hostname to the operating system and it changes across a restart, the node rejoins under a new name while the cluster is still holding a place for the old one. If the hostname cannot be resolved through DNS, set [`CLUSTER_ADVERTISE_ADDR`](/deploy/configuration/env-vars/index.md#CLUSTER_ADVERTISE_ADDR) to advertise the node's address directly.
- Give each node a [`CLUSTER_GOSSIP_BIND_PORT`](/deploy/configuration/env-vars/index.md#CLUSTER_GOSSIP_BIND_PORT), used to exchange network state information, and a [`CLUSTER_DATA_BIND_PORT`](/deploy/configuration/env-vars/index.md#CLUSTER_DATA_BIND_PORT), used to exchange data. By convention the data port is one higher than the gossip port. Then confirm that every node can actually reach every other node on both of those ports. A firewall rule, an unpublished container port, or a network policy that only exposes the HTTP port will let a node start up perfectly well and still leave it unable to find anyone.
- For consensus specifically, check the Raft settings. [`RAFT_JOIN`](/deploy/configuration/env-vars/index.md#RAFT_JOIN) names the voter nodes, and [`RAFT_BOOTSTRAP_EXPECT`](/deploy/configuration/env-vars/index.md#RAFT_BOOTSTRAP_EXPECT) sets how many voters the cluster waits for at bootstrap. If you set `RAFT_JOIN`, you must adjust `RAFT_BOOTSTRAP_EXPECT` by hand to match the number of voters you listed. When the two disagree, the cluster waits for a member that will never arrive.

Once the nodes are talking, check `/v1/cluster/statistics` again. Every node should appear in the response, and `synchronized` should be `true`.

</details>

### You've downgraded and now your clusters won't reach the `Ready` state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ You can set `skipInitChecks` to `true` to skip these checks.

```js
import weaviate from 'weaviate-client';
Add commentMore actions

const client = await weaviate.connectToLocal({
skipInitChecks: true,
})
Expand All @@ -147,7 +147,7 @@ type Article = {
wordcount: number,
};

const collection = client.collections.get < Article > "Article";
const collection = client.collections.get<Article>("Article");
await collection.data.insert({
// compiler error since 'body' field is missing in '.insert'
title: "TS is awesome!",
Expand Down
20 changes: 2 additions & 18 deletions docs/weaviate/manage-objects/read-all-objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ The following code iterates through all objects, providing the properties and id
<TabItem value="go" label="Go">
<FilteredTextBlock
text={GoCode}
startMarker="// Retrieve data"
endMarker="// Use this function to retrieve data"
startMarker="// START ReadAllProps"
endMarker="// END ReadAllProps"
language="go"
/>
</TabItem>
Expand Down Expand Up @@ -95,14 +95,6 @@ Read through all data including the vectors. (Also applicable where [named vecto
language="ts"
/>
</TabItem>
<TabItem value="go" label="Go">
<FilteredTextBlock
text={GoCode}
startMarker="// START ReadAllVectors"
endMarker="// END ReadAllVectors"
language="go"
/>
</TabItem>
<TabItem value="java" label="Java">
<FilteredTextBlock
text={JavaV6Code}
Expand Down Expand Up @@ -146,14 +138,6 @@ For classes where [multi-tenancy](../concepts/data.md#multi-tenancy) is enabled,
language="ts"
/>
</TabItem>
<TabItem value="go" label="Go">
<FilteredTextBlock
text={GoCode}
startMarker="// START ReadAllTenants"
endMarker="// END ReadAllTenants"
language="go"
/>
</TabItem>
<TabItem value="java" label="Java">
<FilteredTextBlock
text={JavaV6Code}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def import_data():
"DemoCollection",
# highlight-start
generative_config=Configure.Generative.anthropic(
model="claude-3-opus-20240229"
model="claude-haiku-4-5"
)
# highlight-end
# Additional parameters not shown
Expand All @@ -87,7 +87,7 @@ def import_data():
generative_config=Configure.Generative.anthropic(
# # These parameters are optional
# base_url="https://api.anthropic.com",
# model="claude-3-opus-20240229",
# model="claude-haiku-4-5",
# max_tokens=512,
# temperature=0.7,
# stop_sequences=["\n\n"],
Expand Down Expand Up @@ -116,7 +116,7 @@ def import_data():
generative_provider=GenerativeConfig.anthropic(
# # These parameters are optional
# base_url="https://api.anthropic.com",
# model="claude-3-opus-20240229",
# model="claude-haiku-4-5",
# max_tokens=512,
# temperature=0.7,
# stop_sequences=["\n\n"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ await client.collections.create({
name: 'DemoCollection',
// highlight-start
generative: weaviate.configure.generative.anthropic({
model: 'claude-3-opus-20240229'
model: 'claude-haiku-4-5'
}),
// highlight-end
// Additional parameters not shown
Expand All @@ -73,7 +73,7 @@ await client.collections.create({
generative: weaviate.configure.generative.anthropic({
// These parameters are optional
// baseURL: 'https://api.anthropic.com',
// model: 'claude-3-opus-20240229',
// model: 'claude-haiku-4-5',
// maxTokens: 512,
// temperature: 0.7,
// stopSequences: ['\n\n'],
Expand Down Expand Up @@ -103,7 +103,7 @@ response = await myCollection.generate.nearText("A holiday film", {
config: generativeParameters.anthropic({
// These parameters are optional
// baseURL: "https://api.anthropic.com",
// model: "claude-3-opus-20240229",
// model: "claude-haiku-4-5",
// maxTokens: 512,
// temperature: 0.7,
// stopSequences: ["\n\n"],
Expand Down Expand Up @@ -201,7 +201,7 @@ response = myCollection.generate.nearText("A holiday film", {
config: generativeParameters.anthropic({
// These parameters are optional
// baseURL: "https://api.anthropic.com",
// model: "claude-3-opus-20240229",
// model: "claude-haiku-4-5",
// maxTokens: 512,
// temperature: 0.7,
// stopSequences: ["\n\n"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
name="title_vector",
source_properties=["title"],
# Further options
model_id="gemini-embedding-2",
model="gemini-embedding-2",
),
# highlight-end
# Additional parameters not shown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ await client.collections.create({
],
// highlight-start
vectorizers: [
weaviate.configure.vectors.text2VecGoogle({
weaviate.configure.vectors.text2VecGoogleGemini({
name: 'title_vector',
sourceProperties: ['title'],
// (Optional) To manually set the model ID
Expand Down
7 changes: 1 addition & 6 deletions docs/weaviate/model-providers/anthropic/generative.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,7 @@ The default base URL is `https://api.anthropic.com`.

### Available models

Any model available in the Anthropic API can be used with Weaviate. As of July 2024, the following models are available:

- `claude-3-5-sonnet-20240620` (default)
- `claude-3-opus-20240229`
- `claude-3-sonnet-20240229`
- `claude-3-haiku-20240307`
Any model available in the Anthropic API can be used with Weaviate. If you do not specify a model, Weaviate uses `claude-haiku-4-5` by default.

See the [Anthropic API documentation](https://docs.anthropic.com/en/docs/about-claude/models#model-names) for the most up-to-date list of available models.

Expand Down
2 changes: 1 addition & 1 deletion docs/weaviate/model-providers/google/embeddings.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ You can [specify](#vectorizer-parameters) one of the [available models](#availab

### Google AI Studio (Gemini API)

For Google AI Studio, use the `text2vec_google_gemini()` vectorizer. No `project_id` or `api_endpoint` is required.
For Google AI Studio, use the Gemini-specific vectorizer. A Google Cloud project ID is not required. The Python and TypeScript clients set the Gemini API endpoint for you.

<Tabs className="code" groupId="languages">
<TabItem value="py" label="Python">
Expand Down
Loading
Loading