-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unknown argument: prompt #49
Comments
@LuoTuxiu I also ran into this issue and managed to work around it. There seems to be two problems causing it, first is that the function getCodemodTransformResult(
codemod: AICompletionCodemod | AIChatCodemod,
response: CreateChatCompletionResponse
): CodemodResult<unknown> {
if (codemod.extractTransformationFromCompletion) {
return codemod.extractTransformationFromCompletion(response);
}
return defaultExtractResultFromCompletion(response.choices[0].message?.content);
} to: function getCodemodTransformResult(
codemod: AICompletionCodemod | AIChatCodemod,
response: CreateChatCompletionResponse
): CodemodResult<unknown> {
if (codemod.extractTransformationFromCompletion) {
return codemod.extractTransformationFromCompletion(response);
}
// @ts-ignore
return defaultExtractResultFromCompletion(response.choices[0].text);
} |
Then I was able to run the demo, given that I provided the proper |
Was playing around with this and ran into the same issue. I'm assuming this is more of an experiment, but wondering if a CR could be made with this fix if it might get accepted. |
I had already fixed this on a branch a couple weeks ago, and saw this thread, so decided to push it up in case anyone needs it. |
Hi, i am trying to run
yarn demo:ai
in this repo, but i get this error:Could you give me any idea to fix it?
The text was updated successfully, but these errors were encountered: