Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error code: 400 #2

Open
chrishuang0729 opened this issue May 11, 2024 · 1 comment
Open

Error code: 400 #2

chrishuang0729 opened this issue May 11, 2024 · 1 comment

Comments

@chrishuang0729
Copy link

Hi,

當執行以下指令時,在run_geval_ground.py中執行到get_completion_list()get_completion_list_req()時就會得到這個error:
Error code: 400 - {'error': {'message': 'invalid model ID', 'type': 'invalid_request_error', 'param': None, 'code': None}}

python evaluation/run_geval_ground.py
  --gen_result_path <generated jsonl path> \
  --output_path <output judge json file> \
  --req_method async # or req

看起來是無法在message中放入多個prompt,請問有辦法解決嗎,謝謝

@nctu6
Copy link
Contributor

nctu6 commented May 12, 2024

您好,

run_geval_ground.py 讀入的 result 格式為(result 預設為 generate_with_large_lm.py 的 output 結果):
{"qid":0,"model":"testing_model","prompt":"testing_prompt1","response":"model_response1"}
{"qid":1,"model":"testing_model","prompt":"testing_prompt2","response":"model_response2"}
...
然後將 result 轉為 OpenAI API 的 messages 格式(如果 result 不是以上 key/value pairs,需自行修改程式碼)。
最後,將 messages 傳進 OpenAI API。

如何在 messages 中放入多個 prompt 請參考 OpenAI API 的用法。
https://platform.openai.com/docs/guides/text-generation/chat-completions-api

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants