Closed abichinger closed 1 year ago
Thank you for submitting the PR! The typechat-approach looks interesting and could be an alternative to the current openai-service with a primitive prompt-engineering.
However, there is currently the problem that the typechat-tests are failing in the CI: https://github.com/fkirc/attranslate/actions/runs/5770043007/job/15643564890?pr=256
Based on the test-summary, it seems that some module-import within the typechat-package is failing?
Looks like typechat requires node >= 18. (package.json)
I added a check to ensure the correct node version is installed.
After upgrading node to v18, I see a new CI-error:
src/util/util.ts:10:20 - error TS7016: Could not find a declaration file for module 'semver'. '/home/runner/work/attranslate/attranslate/node_modules/semver/index.js' implicitly has an 'any' type.
Try npm i --save-dev @types/semver
if it exists or add a new declaration (.d.ts) file containing declare module 'semver';
10 import semver from "semver";
Found 1 error.
Oops, I forgot to commit the package.json
file
Now the CI passes again, I merged typechat and released version 2.1.0!
Servus!
Thanks for this awesome tool!
I added a new services which uses OpenAI and TypeChat to translate all strings.
New services:
typechat
- translates a batch of 10 with a single prompttypechat-manual
- feed the prompt into a LLM and copy the resulttext-davinci-003
https://api.openai.com/v1/chat/completions
10
AppLocalizations
undefined
I wasn't able to test it with the official OpenAI API, because I don't have an OpenAI API key. But it worked with a local llama-cpp-python web server.
Example
A generated prompt will look like this:
Response from ChatGPT: