Skip to content

Commit 0156466

Browse files
DOC-5769 enabled C#-Sync client variant
1 parent 63ac750 commit 0156466

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

content/develop/clients/dotnet/vecsets.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ directive suppresses warnings about the experimental status of the vector set AP
5555

5656
Use the `GetPredictionEngine()` helper function declared in the example below to load the model that creates the embeddings:
5757

58-
{{< clients-example set="home_vecsets" step="model" lang_filter="C#" >}}
58+
{{< clients-example set="home_vecsets" step="model" lang_filter="C#-Sync" >}}
5959
{{< /clients-example >}}
6060

6161
The `GetPredictionEngine()` function uses two classes, `TextData` and `TransformedTextData`,
6262
to specify the `PredictionEngine` model. These have a very simple definition
6363
and are required because the model expects the input and output to be
6464
passed in named object fields:
6565

66-
{{< clients-example set="home_vecsets" step="data_classes" lang_filter="C#" >}}
66+
{{< clients-example set="home_vecsets" step="data_classes" lang_filter="C#-Sync" >}}
6767
{{< /clients-example >}}
6868

6969
Note that you must declare these classes at the end of the source file
@@ -73,15 +73,15 @@ The `GetEmbedding()` function declared below can then use this model to
7373
generate an embedding from a section of text and return it as a `float[]` array,
7474
which is the format required by the vector set API:
7575

76-
{{< clients-example set="home_vecsets" step="get_embedding" lang_filter="C#" >}}
76+
{{< clients-example set="home_vecsets" step="get_embedding" lang_filter="C#-Sync" >}}
7777
{{< /clients-example >}}
7878

7979
## Create the data
8080

8181
The example data is contained a `Dictionary` object with some brief
8282
descriptions of famous people:
8383

84-
{{< clients-example set="home_vecsets" step="data" lang_filter="C#" >}}
84+
{{< clients-example set="home_vecsets" step="data" lang_filter="C#-Sync" >}}
8585
{{< /clients-example >}}
8686

8787
## Add the data to a vector set
@@ -99,7 +99,7 @@ The call to `VectorSetAdd()` also adds the `born` and `died` values from the
9999
original dictionary as attribute data. You can access this during a query
100100
or by using the [`VectorSetGetAttributesJson()`]({{< relref "/commands/vgetattr" >}}) method.
101101

102-
{{< clients-example set="home_vecsets" step="add_data" lang_filter="C#" >}}
102+
{{< clients-example set="home_vecsets" step="add_data" lang_filter="C#-Sync" >}}
103103
{{< /clients-example >}}
104104

105105
## Query the vector set
@@ -112,7 +112,7 @@ return elements of the set, ranked in order of similarity to the query.
112112

113113
Start with a simple query for "actors":
114114

115-
{{< clients-example set="home_vecsets" step="basic_query" lang_filter="C#" >}}
115+
{{< clients-example set="home_vecsets" step="basic_query" lang_filter="C#-Sync" >}}
116116
{{< /clients-example >}}
117117

118118
This returns the following list of elements (formatted slightly for clarity):
@@ -131,7 +131,7 @@ on the information contained in the embedding model.
131131
You can use the `Count` property of `VectorSetSimilaritySearchRequest` to limit the
132132
list of elements to just the most relevant few items:
133133

134-
{{< clients-example set="home_vecsets" step="limited_query" lang_filter="C#" >}}
134+
{{< clients-example set="home_vecsets" step="limited_query" lang_filter="C#-Sync" >}}
135135
{{< /clients-example >}}
136136

137137
The reason for using text embeddings rather than simple text search
@@ -141,7 +141,7 @@ different. For example, the word "entertainer" doesn't appear in any of the
141141
descriptions but if you use it as a query, the actors and musicians are ranked
142142
highest in the results list:
143143

144-
{{< clients-example set="home_vecsets" step="entertainer_query" lang_filter="C#" >}}
144+
{{< clients-example set="home_vecsets" step="entertainer_query" lang_filter="C#-Sync" >}}
145145
{{< /clients-example >}}
146146

147147
Similarly, if you use "science" as a query, you get the following results:
@@ -162,7 +162,7 @@ with `VectorSetSimilaritySearch()` to restrict the search further. For example,
162162
repeat the "science" query, but this time limit the results to people
163163
who died before the year 2000:
164164

165-
{{< clients-example set="home_vecsets" step="filtered_query" lang_filter="C#" >}}
165+
{{< clients-example set="home_vecsets" step="filtered_query" lang_filter="C#-Sync" >}}
166166
{{< /clients-example >}}
167167

168168
Note that the boolean filter expression is applied to items in the list

data/components/nredisstack_sync.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "nredisstack_sync",
33
"type": "client",
44
"name": "NRedisStack_Sync",
5-
"language": "C#-Sync",
5+
"language": "C#",
66
"label": "C#-Sync",
77
"repository": {
88
"git_uri": "https://github.com/redis/NRedisStack"

layouts/partials/tabs/wrapper.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{ range $i, $tab := $tabs }}
1313
{{ $tid := printf "%s_%s" (replace (replace (index $tab "title") "#" "sharp") "." "") $id }}
1414
{{ $pid := printf "panel_%s" $tid }}
15-
{{ $dataLang := replace (or (index $tab "language") "redis-cli") "C#-Sync" "dotnet_sync" }}
15+
{{ $dataLang := replace (or (index $tab "language") "redis-cli") "C#" "dotnet" }}
1616
{{ $dataLang := replace $dataLang "." "-" }}
1717
<input tabindex="1" type="radio" name="{{ $id }}" id="{{ $tid }}" data-lang="{{ $dataLang }}" class="radiotab w-0 h-0"
1818
{{ if eq $i 0 }}checked{{ end }}

0 commit comments

Comments
 (0)