Tmoney
Tmoney7mo ago

Tmoney - Hi, I would like to store the data gen...

Hi, I would like to store the data generated to Firestore, but it's bringing out this error 'Value for argument ”data” is not a valid Firestore document. Input is not a plain JavaScript object.' It's creating document but not storing any data.
No description
Solution:
yes, you can use the system prompt to provide a schema for example ``` { BookName:string, pageNames: string[], pageNumbers: number[],...
Jump to solution
7 Replies
Shams
Shams7mo ago
try adding the json parser node in between, also you make sure your max token is high enough to generate full response without cutting off halfway
No description
Tmoney
Tmoney7mo ago
Is there any way I can make the parsed JSON to have the same keys as the one in this image?
No description
Solution
Shams
Shams7mo ago
yes, you can use the system prompt to provide a schema for example
{ BookName:string,
pageNames: string[],
pageNumbers: number[],
pageText:""
...
}
{ BookName:string,
pageNames: string[],
pageNumbers: number[],
pageText:""
...
}
Tmoney
Tmoney7mo ago
That's on the json generator right?
Shams
Shams7mo ago
yes the second field you can give all the instructions on how you want the json to be structured
Tmoney
Tmoney7mo ago
still the same thing "Value for argument "data" is not a valid Firestore document. Input is not a plain JavaScript object."
Gaurav Chadha
Gaurav Chadha7mo ago
Hi @Tmoney, you'll require to ensure that the json you are providing is valid and error free (no red dots), also ensure that the field type is set to JavaScript.
No description