Skip to content

Commit 5917de1

Browse files
committed
chore: inside-field
1 parent 3bf73da commit 5917de1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/tools/mongodb/create/insertMany.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class InsertManyTool extends MongoDBToolBase {
1616
documents: z
1717
.array(zEJSON().describe("An individual MongoDB document"))
1818
.describe(
19-
"The array of documents to insert, matching the syntax of the document argument of db.collection.insertMany(). For fields that have vector search indexes, you can provide raw text strings that will be automatically converted to embeddings if embeddingParameters is provided."
19+
"The array of documents to insert, matching the syntax of the document argument of db.collection.insertMany(). If you are asked to generate a embedding for a field, you have to explicitly specify the field name with a raw text string value of the field and an embedding will be generated if embeddingParameters is provided."
2020
),
2121
embeddingParameters: zSupportedEmbeddingParameters
2222
.optional()

tests/accuracy/insertMany.embeddings.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const embeddingParameters = {
1717
describeAccuracyTests(
1818
[
1919
{
20-
prompt: "Insert a document into 'mflix.movies' collection with title 'The Matrix' and a plotSummary field with the text 'A computer hacker learns about the true nature of his reality'. Use the plot summary to generate the 'plotEmbeddings' field using the voyage-3 model.",
20+
prompt: "Insert a document into 'mflix.movies' collection with title 'The Matrix' and a plotSummary field with the text 'A computer hacker learns about the true nature of his reality' and a 'plotSummaryEmbeddings' field which should be generated using the voyage-3.5 model.",
2121
expectedToolCalls: [
2222
{
2323
toolName: "insert-many",
@@ -28,10 +28,12 @@ describeAccuracyTests(
2828
{
2929
title: "The Matrix",
3030
plotSummary: "A computer hacker learns about the true nature of his reality",
31-
plotEmbeddings: "A computer hacker learns about the true nature of his reality",
31+
plotSummaryEmbeddings: "A computer hacker learns about the true nature of his reality",
3232
},
3333
],
34-
embeddingParameters,
34+
embeddingParameters: {
35+
model: "voyage-3.5",
36+
},
3537
},
3638
},
3739
],

0 commit comments

Comments
 (0)