-
-
Notifications
You must be signed in to change notification settings - Fork 651
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
v.1.6.3 BatchJob.create_from_messages produces jsonl with wrong structure #1119
Comments
same issue here (accidentally opened another issue in parallel): I am creating a batch for gpt-3.5-turbo: chunks = pd.read_csv(input_path) def create_batch(chunks): batch_job = BatchJob.create_from_messages( but when i want to upload it using $instructor batch create-from-file --file-path /my/path/example_batchname.jsonl I'm getting the processing status "failed". Checking the OpenAI message revealed its missing the method, url, and body in the jsonl. In other words, the format isn't what OpenAI expects. the json format is: {"custom_id":"b43f1dca-dac0-4ece-b6cf-3aae7b433ac4","params":{"model":"gpt-3.5-turbo","messages":[...],"max_tokens":1000,"temperature":0.0,"tools":[{"type":"function","function":{"name":"ClassModel","description":"Correctly extracted ClassModel with all the required parameters with correct types","parameters":{"properties":{"relevant":{"title":"Relevant","type":"integer"},"confidence":{"title":"Confidence","type":"integer"},"relevant_section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Relevant Section"},"justification":{"title":"Justification","type":"string"}},"required":["confidence","justification","relevant","relevant_section"],"type":"object"}}}],"tool_choice":{"type":"function","function":{"name":"ClassModel"}}}} Any idea what I'm doing wrong? Help would be appreciated. Thanks in advance. |
By replacing
TO
fixed the issue for me. batch create-from-file seems to not create the proper file structure for openai |
The function produces json lines with wrong structure. Missing method and url keys.
This results 'missing required 'method'* error when posted to openai.
v.1.6.2 works fine
The text was updated successfully, but these errors were encountered: