di-sukharev / opencommit

Generate conventional git commit messages with AI in 1 second 🤯🔫
https://www.npmjs.com/package/opencommit
MIT License
5.94k stars 311 forks source link

Error 502 on running oco #272

Open lypsisrudiansyah opened 10 months ago

lypsisrudiansyah commented 10 months ago

here it is the details

◐  Generating the commit message..    
│
└  ✖ {"model":"gpt-3.5-turbo","messages":[{"role":"system","content":"You are to act as the author of a commit message in git. Your mission is to create clean and comprehensive commit messages as per the conventional commit convention and explain 
WHAT were the changes and mainly WHY the changes were done. I'll send you an output of 'git diff --staged' command, and you are to convert it into a commit message.\n    Use GitMoji convention to preface the commit.\n    Don't add any descriptions to the commit, only commit message.\n    Use the present tense. Lines must not be longer than 74 characters. Use english for the commit message."},{"role":"user","content":"diff --git a/src/server.ts b/src/server.ts\n    index ad4db42..f3b18a9 100644\n    --- a/src/server.ts\n    +++ b/src/server.ts\n    @@ -10,7 +10,7 @@\n    import {\n        initWinstonLogger();\n        \n        const app = express();\n        -const port = 7799;\n        +const PORT = 7799;\n        \n        app.use(express.json());\n        \n        @@ -34,6 +34,6 @@\n        app.use((_, res, next) => {\n            // ROUTES\n            app.use(PROTECTED_ROUTER_URL, protectedRouter);\n            \n            -app.listen(port, () => {\n
-  console.log(`Server listening on port ${port}`);\n                +app.listen(process.env.PORT || PORT, () => {\n                    +  console.log(`Server listening on port ${PORT}`);\n                });"},{"role":"assistant","content":"🐛 fix(server.ts): change port variable case from lowercase port to uppercase PORT to improve semantics\n✨ feat(server.ts): add support for process.env.PORT environment variable to be able to run app on a configurable port\n"},{"role":"user","content":
"diff --git a/lib/module/forgot_password/view/forgot_password_view.dart b/lib/module/forgot_password/view/forgot_password_view.dart\nindex d3aa9ce..7062cb3 100644\n--- a/lib/module/forgot_password/view/forgot_password_view.dart\n+++ b/lib/module/forgot_password/view/forgot_password_view.dart\n@@ -1,31 +1,41 @@\n-\n import 'package:flutter/material.dart';\n import 'package:flutter_lypsisbook/core.dart';\n+import 'package:flutter_lypsisbook/shared/theme_config.dart';\n+import 'package:flutter_lypsisbook/shared/widget/lypsis_button_fw.dart';\n+import 'package:flutter_lypsisbook/shared/widget/r_text_field.dart';\n import '../controller/forgot_password_controller.dart';\n \n class ForgotPasswordView extends StatefulWidget {\n-    const 
ForgotPasswordView({Key? key}) : super(key: key);\n+  const ForgotPasswordView({Key? key}) : super(key: key);\n \n-    Widget build(context, ForgotPasswordController controller) {\n+  Widget build(context, ForgotPasswordController controller) {\n 
    controller.view = this;\n \n     return Scaffold(\n-        appBar: AppBar(\n+      appBar: AppBar(\n+        centerTitle: true,\n         title: const Text(\"ForgotPassword\"),\n         actions: const [],\n-        ),\n-        body: SingleChildScrollView(\n+      ),\n+      body: SafeArea(\n         child: Container(\n-            padding: const EdgeInsets.all(10.0),\n-            child: Column(\n-            children: const [],\n-            ),\n-        ),\n+          padding: const EdgeInsets.all(10.0),\n+          child: Column(\n+            children: [\n+              RTextField(\n+                hintText: 'Email',\n+                hintColor: secondaryColor,\n+                onChanged: (value) {},\n+              ),\n+              const SizedBox(height: 20.0),\n+              LypsisButtonFW(text: \"Forgot Password\", onPressed: () {}),\n+            ],\n+          ),\n         ),\n+      ),\n     );\n-    }\n+  }\n \n-    @override\n-    State<ForgotPasswordView> createState() => ForgotPasswordController();\n+  @override\n+  State<ForgotPasswordView> createState() => ForgotPasswordController();\n }\n-    \n\\ No newline at end of file"}],"temperature":0,"top_p":0.1,"max_tokens":500}

│
│
◇  📝 Commit message generated
│
└  ✖ Request failed with status code 502
github-actions[bot] commented 9 months ago

Stale issue message

di-sukharev commented 6 months ago

reopening, will take a look at this

di-sukharev commented 6 months ago

please provide more context, oco --version at least.. is it persistent? sometimes openai responds with 502, mb it's cloudflare, do you use vpn?