-
-
Notifications
You must be signed in to change notification settings - Fork 223
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
Add a script to translate commcare with openai #35754
base: master
Are you sure you want to change the base?
Conversation
], | ||
temperature=0.2, | ||
) | ||
return json.loads(completion.choices[0].message.content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be useful to structured outputs to get a better chance of it producing the right result: https://platform.openai.com/docs/guides/structured-outputs
Either using response_format
or using function calling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @snopoke! That is helpful. I was not aware of that. I have definitely seen it producing wrong formats in one or two runs.
…sages. Will fix later
./corehq/apps/reports/views.py:806: warning: 'msgid' format string with unnamed arguments cannot be properly localized: The translator cannot reorder the arguments. Please consider using a format string with named argument
gettext() returns the header entry with meta information, not the empty string.
…nction more fault tolerant
Product Description
A prototype of using LLMs to make translations in HQ
Technical Summary
Feature Flag
Safety Assurance
Safety story
Automated test coverage
QA Plan
Migrations
Rollback instructions
Labels & Review