https://promptfoo.dev/ logo
invalid-json Error
# ❓|questions
s
Hello! I ran command below and after it finished I got this error(in uploaded text file). Command:
Copy code
npx promptfoo eval --no-cache --repeat 1 -c ../../app/promptfoo/chat/promptfooconfig.yaml -o chat_result.json --share
I know that 'the json' is in invalid format, so they are telling me
Unexpected token I in JSON at position 0
But I can't figure out which JSON is wrong. Is response of AI model? or result of test file? would be so thankful if you give me clue for this. Thank you! https://cdn.discordapp.com/attachments/1286493461544960134/1286493462178304093/logs.txt?ex=66ee1be7&is=66ecca67&hm=e0f11c3d2fbf985d253e276d570b02cae494ae545ef30f92502aa620ed17154d&
I thought
Unexpected token I in JSON at position 0
message could printed after i got
Internal Server Error
from
https://api.promptfoo.dev/api/eval
API call.
m
@stkim03_96161 where you able to save the json successfully and the share didn't work, or neither worked? If you were able to save results to chat_result.json, can you send it me (michael@promptfoo.dev) and i'll look
s
unfortunately even chat_result.json is not saved. so
Copy code
Error: ENOENT: no such file or directory, open 'chat_result.json'
    at Object.openSync (node:fs:596:3)
    at readFileSync (node:fs:464:35)
    at init (file:///code/tests/promptfoo/main.js:22:20)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'chat_result.json'
this error occured too.
m
I am sorry about this. I can look at this together with you later today: https://cal.com/michael-dangelo/15min
i
this PR catches share errors, so at least your results will be written even if the share doesn't work https://github.com/promptfoo/promptfoo/pull/1726
I assume if you run it without
--share
it works? In that case, could you provide the json? With the results JSON we should be able to repro on our side
s
Thanks for your quick support! I reserved meeting with @michaelmichaelmichael and I'll check out provided json result without
--share
and send it to @ian .
@michaelmichaelmichael @ian Hello! I'm curious about how this issue is going now just to follow up the situation.
i
unfortunately right now we can't handle very large uploads to the free sharing service. we're working on improving this, but for now the best way to proceed would be to sign up for a paid plan. if this is something you're interested in, let me know and I can help you get started