Comments (4)
Thanks for reporting the issue!
What happens when you re-run the command with RUST_LOG=trace
?
from gptcommit.
Hi, thanks for the fast reply!
This results in the following output (Bearer key is replaced with "sk-..."):
2023-02-02T08:34:56.286Z DEBUG [gptcommit::settings] Using home dir at /home/tfr
2023-02-02T08:34:56.286Z DEBUG [gptcommit::settings] Found config dir at /home/tfr/.config/gptcommit
2023-02-02T08:34:56.287Z DEBUG [gptcommit::settings] Applying config file at /home/tfr/.config/gptcommit/config.toml
2023-02-02T08:34:56.287Z DEBUG [gptcommit::settings] Applying config from GPTCOMMIT__*: Ok({})
2023-02-02T08:34:56.287Z DEBUG [gptcommit] Settings: Settings { model_provider: Some(OpenAI), openai: Some(OpenAISettings { api_key: Some("sk-..."), model: Some("text-davinci-003") }), prompt: Some(PromptSettings { file_diff: Some("You are an expert programmer, and you are trying to summarize a git diff.\nReminders about the git diff format:\nFor every file, there are a few metadata lines, like (for example):\n```\ndiff --git a/lib/index.js b/lib/index.js\nindex aadf691..bfef603 100644\n--- a/lib/index.js\n+++ b/lib/index.js\n```\nThis means that `lib/index.js` was modified in this commit. Note that this is only an example.\nThen there is a specifier of the lines that were modified.\nA line starting with `+` means it was added.\nA line that starting with `-` means that line was deleted.\nA line that starts with neither `+` nor `-` is code given for context and better understanding.\nIt is not part of the diff.\nAfter the git diff of the first file, there will be an empty line, and then the git diff of the next file.\n\nDo not include the file name as another part of the comment.\nDo not use the characters `[` or `]` in the summary.\nWrite every summary comment in a new line.\nComments should be in a bullet point list, each line starting with a `-`.\nThe summary should not include comments copied from the code.\nThe output should be easily readable. When in doubt, write less comments and not more. Do not output comments that simply repeat the contents of the file.\nReadability is top priority. Write only the most important comments about the diff.\n\nEXAMPLE SUMMARY COMMENTS:\n```\n- Raise the amount of returned recordings from `10` to `100`\n- Fix a typo in the github action name\n- Move the `octokit` initialization to a separate file\n- Add an OpenAI API for completions\n- Lower numeric tolerance for test files\n- Add 2 tests for the inclusive string split function\n```\nMost commits will have less comments than this examples list.\nThe last comment does not include the file names,\nbecause there were more than two relevant files in the hypothetical commit.\nDo not include parts of the example in your summary.\nIt is given only as an example of appropriate comments.\n\n\nTHE GIT DIFF TO BE SUMMARIZED:\n```\n<FILE_DIFF>\n```\n\nTHE SUMMARY:\n\n"), commit_summary: Some("You are an expert programmer, and you are trying to summarize a pull request.\nYou went over every file that was changed in it.\nFor some of these files changes where too big and were omitted in the files diff summary.\nPlease summarize the pull request.\nWrite your response in bullet points, using the imperative tense following the pull request style guide.\nStarting each bullet point with a `-`.\nWrite a high level description. Do not repeat the commit summaries or the file summaries.\nWrite the most important bullet points. The list should not be more than a few bullet points.\n\nTHE FILE SUMMARIES:\n```\n<SUMMARY_POINTS>\n```\n\nRemember to write only the most important points and do not write more than a few bullet points.\nTHE PULL REQUEST SUMMARY:\n\n"), commit_title: Some("You are an expert programmer, and you are trying to title a pull request.\nYou went over every file that was changed in it.\nFor some of these files changes where too big and were omitted in the files diff summary.\nPlease summarize the pull request into a single specific theme.\nWrite your response using the imperative tense following the kernel git commit style guide.\nWrite a high level title.\nDo not repeat the commit summaries or the file summaries.\nDo not list individual changes in the title.\n\nEXAMPLE SUMMARY COMMENTS:\n```\nRaise the amount of returned recordings\nSwitch to internal API for completions\nLower numeric tolerance for test files\nSchedule all GitHub actions on all OSs\n```\n\nTHE FILE SUMMARIES:\n```\n<SUMMARY_POINTS>\n```\n\nRemember to write only one line, no more than 50 characters.\nTHE PULL REQUEST TITLE:\n\n") }), allow_amend: Some(false) }
🤖 Asking GPT-3 to summarize diffs...
2023-02-02T08:34:56.398Z DEBUG [gptcommit::summarize] summarizing file: sortingutils.cpp
2023-02-02T08:34:56.398Z DEBUG [gptcommit::summarize] summarizing file: sortingutils.h
2023-02-02T08:34:56.398Z DEBUG [gptcommit::openai] Sending request to OpenAI:
RequestBuilder { method: POST, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.openai.com")), port: None, path: "/v1/completions", query: None, fragment: None }, headers: {"content-type": "application/json", "authorization": "Bearer sk-..."} }
2023-02-02T08:34:56.398Z DEBUG [gptcommit::openai] Sending request to OpenAI:
RequestBuilder { method: POST, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.openai.com")), port: None, path: "/v1/completions", query: None, fragment: None }, headers: {"content-type": "application/json", "authorization": "Bearer sk-..."} }
2023-02-02T08:34:56.399Z DEBUG [reqwest::connect] starting new connection: https://api.openai.com/
2023-02-02T08:34:56.399Z DEBUG [reqwest::connect] starting new connection: https://api.openai.com/
2023-02-02T08:34:56.401Z DEBUG [gptcommit::openai] Sending request to OpenAI:
RequestBuilder { method: POST, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.openai.com")), port: None, path: "/v1/completions", query: None, fragment: None }, headers: {"content-type": "application/json", "authorization": "Bearer sk-..."} }
2023-02-02T08:34:56.401Z DEBUG [reqwest::connect] starting new connection: https://api.openai.com/
2023-02-02T08:34:56.401Z DEBUG [gptcommit::openai] Sending request to OpenAI:
RequestBuilder { method: POST, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.openai.com")), port: None, path: "/v1/completions", query: None, fragment: None }, headers: {"content-type": "application/json", "authorization": "Bearer sk-..."} }
2023-02-02T08:34:56.401Z DEBUG [reqwest::connect] starting new connection: https://api.openai.com/
Error: error sending request for url (https://api.openai.com/v1/completions): error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
Caused by:
0: error trying to connect: dns error: failed to lookup address information: Temporary failure in name resolution
1: dns error: failed to lookup address information: Temporary failure in name resolution
2: failed to lookup address information: Temporary failure in name resolution
from gptcommit.
Hmm, I'm not sure what the source of the error is here.
It could be something related to a rust library. I can't reproduce it from my linux virtual machine.
Let me know if you find any other clues here
from gptcommit.
Closing as we haven't heard a response from OP
from gptcommit.
Related Issues (20)
- Proposal: Add a `check` option to verify the local network environment HOT 3
- add a command to uninstall gptcommit HOT 1
- [BUG] Set custom OpenAI API base URL by CLI not working. HOT 1
- Skipping gptcommit because the githook isn't set up for this commit mode HOT 1
- feat: Support git templates like git-cz HOT 2
- Preserve Conventional Commits Subject in Translated Commit Messages
- Can you offer another way to install gptcommit for Windows? Like, Winget HOT 3
- Binaries not generated for v0.5.4 HOT 1
- bug: insufficient_quota: You exceeded your current quota HOT 2
- bug: Continually get unrelated commit messages HOT 2
- Feature: Prompt overrides HOT 2
- bug: Address boundary error HOT 2
- gpt-3.5-turbo-16k support HOT 1
- bug: checking the legitimacy of key when using third-party service HOT 5
- bug: You didn't provide an API key HOT 3
- bug: not respecting `api_base` config HOT 7
- bug: adds old commit items to summaries HOT 1
- How to temporarily disable gptcommit for manual git commit message entry? HOT 1
- Support for gpt-4o
- bug: windows install gptcommit v0.5.16 is fail by cargo
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gptcommit.