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.
Solution:Jump to solution
yes, you can use the system prompt to provide a schema
for example ```
{ BookName:string,
pageNames: string[],
pageNumbers: number[],...
7 Replies
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
Is there any way I can make the parsed JSON to have the same keys as the one in this image?
Solution
yes, you can use the system prompt to provide a schema
for example
That's on the json generator right?
yes
the second field
you can give all the instructions on how you want the json to be structured
still the same thing "Value for argument "data" is not a valid Firestore document. Input is not a plain JavaScript object."
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.