Skip to content

Commit c85c24c

Browse files
committed
Updated Cohere example [skip ci]
1 parent 123eeaa commit c85c24c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/Cohere/Program.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static async Task Main()
4141
await cmd.ExecuteNonQueryAsync();
4242
}
4343

44-
await using (var cmd = new NpgsqlCommand("CREATE TABLE documents (id bigserial PRIMARY KEY, content text, embedding bit(1024))", conn))
44+
await using (var cmd = new NpgsqlCommand("CREATE TABLE documents (id bigserial PRIMARY KEY, content text, embedding bit(1536))", conn))
4545
{
4646
await cmd.ExecuteNonQueryAsync();
4747
}
@@ -82,11 +82,11 @@ static async Task Main()
8282

8383
private static async Task<byte[][]> Embed(string[] texts, string inputType, string apiKey)
8484
{
85-
var url = "https://api.cohere.com/v1/embed";
85+
var url = "https://api.cohere.com/v2/embed";
8686
var data = new
8787
{
8888
texts = texts,
89-
model = "embed-english-v3.0",
89+
model = "embed-v4.0",
9090
input_type = inputType,
9191
embedding_types = new string[] { "ubinary" }
9292
};

0 commit comments

Comments
 (0)