Giter Club home page Giter Club logo

Comments (4)

zurawiki avatar zurawiki commented on August 19, 2024

Thanks for reporting the issue!

What happens when you re-run the command with RUST_LOG=trace?

from gptcommit.

Cmplx21 avatar Cmplx21 commented on August 19, 2024

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.

zurawiki avatar zurawiki commented on August 19, 2024

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.

zurawiki avatar zurawiki commented on August 19, 2024

Closing as we haven't heard a response from OP

from gptcommit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.