Open Memie1 opened 1 year ago
Refer to the uploaded file. The file is .txt replace it with dart and copy it in you project with an .dart extension Also add you api key where it is written past_your_api_key
And then you are good to go.
If any persists you can ask me...
This widget is giving an error at this widget: void _sendMessage() async { if (_controller.text.isEmpty) return; ChatMessage message = ChatMessage( text: _controller.text, sender: "user", isImage: false, );
}
This is the error: [{ "resource": "", "owner": "_generated_diagnostic_collectionname#1", "code": { "value": "undefined_method", "target": { "$mid": 1, "path": "/diagnostics/undefined_method", "scheme": "https", "authority": "dart.dev" } }, "severity": 8, "message": "The method 'onCompleteText' isn't defined for the type 'OpenAI'.\nTry correcting the name to the name of an existing method, or defining a method named 'onCompleteText'.", "source": "dart", "startLineNumber": 68, "startColumn": 39, "endLineNumber": 68, "endColumn": 53 }]
I've been trying to troubleshoot this for a couple of hours. I've tried adding different dependencies, but nothing is working. Would appreciate help. It's literally just the onCompleteText that is giving me an error. I would have thought using the most up-to-date dependency would help but nothing is working.