{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":607013954,"defaultBranch":"main","name":"PentestGPT","ownerLogin":"GreyDGL","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-02-27T06:01:53.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/78410652?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1719047233.0","currentOid":""},"activityList":{"items":[{"before":"bd5441a5af8698519757805089ba583ec43c5d72","after":"8650718334ec97b3eba5fa55ec6c87153a21eb34","ref":"refs/heads/artifact","pushedAt":"2024-06-22T09:09:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"update readme","shortMessageHtmlLink":"update readme"}},{"before":"a6edb3053ef1b3e0c36286306bc95cd8e6ceb026","after":"bd5441a5af8698519757805089ba583ec43c5d72","ref":"refs/heads/artifact","pushedAt":"2024-06-22T09:07:46.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"update","shortMessageHtmlLink":"update"}},{"before":null,"after":"a6edb3053ef1b3e0c36286306bc95cd8e6ceb026","ref":"refs/heads/artifact","pushedAt":"2024-06-22T09:07:13.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Support gpt4o (#233)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ add visual parsing for GPT4o\r\n\r\n* feat: ๐ŸŽธ update default API model","shortMessageHtmlLink":"Support gpt4o (#233)"}},{"before":"0151345bf3b149e47c4927a32dbfa55360fe9838","after":null,"ref":"refs/heads/gpt4all-dev","pushedAt":"2024-05-15T08:26:04.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"}},{"before":"f549e1d39aaa531fac5f328b55c1e9f04db7c2f6","after":null,"ref":"refs/heads/fix-key","pushedAt":"2024-05-15T08:26:04.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"}},{"before":"7791bc976911e0db8ee64258a0664b5546015089","after":null,"ref":"refs/heads/vision","pushedAt":"2024-05-15T08:26:03.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"}},{"before":"bb768c1f13558433b415ea75d4d0168d5fd0a777","after":"a6edb3053ef1b3e0c36286306bc95cd8e6ceb026","ref":"refs/heads/main","pushedAt":"2024-05-15T08:25:54.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Support gpt4o (#233)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ add visual parsing for GPT4o\r\n\r\n* feat: ๐ŸŽธ update default API model","shortMessageHtmlLink":"Support gpt4o (#233)"}},{"before":"83aa8a39ad858ae14f47708fe4c6f80b8dcca3fa","after":"afc1a5b95ac798b5af90074eb0d9b7d9595cb48b","ref":"refs/heads/support-gpt4o","pushedAt":"2024-05-15T08:24:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"feat: ๐ŸŽธ update default API model","shortMessageHtmlLink":"feat: ๐ŸŽธ update default API model"}},{"before":null,"after":"83aa8a39ad858ae14f47708fe4c6f80b8dcca3fa","ref":"refs/heads/support-gpt4o","pushedAt":"2024-05-15T08:22:39.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"feat: ๐ŸŽธ add visual parsing for GPT4o","shortMessageHtmlLink":"feat: ๐ŸŽธ add visual parsing for GPT4o"}},{"before":"bb768c1f13558433b415ea75d4d0168d5fd0a777","after":"64de27394d7b16544959597fa367b480571ec029","ref":"refs/heads/deepsource-transform-79fad6b6","pushedAt":"2024-05-15T06:57:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"style: format code with Black\n\nThis commit fixes the style issues introduced in bb768c1 according to the output\nfrom Black.\n\nDetails: None","shortMessageHtmlLink":"style: format code with Black"}},{"before":null,"after":"bb768c1f13558433b415ea75d4d0168d5fd0a777","ref":"refs/heads/deepsource-transform-79fad6b6","pushedAt":"2024-05-15T06:57:55.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"Openai compatability (#231)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ update gpt4o\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 99581a8 according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/229\r\n\r\n* fix: ๐Ÿ› fix OPENAI_KEY typo\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 8f9091c according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/230\r\n\r\n* feat: ๐ŸŽธ update openai python sdk\r\n\r\n---------\r\n\r\nCo-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>","shortMessageHtmlLink":"Openai compatability (#231)"}},{"before":"ae2588837da92d3da501b753007081f6e0ed8a91","after":"64678b1e9eec6b3b8f71c15d1ea5188ee3679eee","ref":"refs/heads/openai-compatability","pushedAt":"2024-05-15T06:57:47.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"style: format code with Black\n\nThis commit fixes the style issues introduced in ae25888 according to the output\nfrom Black.\n\nDetails: https://github.com/GreyDGL/PentestGPT/pull/231","shortMessageHtmlLink":"style: format code with Black"}},{"before":"f072f90293962a5db467ce9a8e8199985a3de6c4","after":"bb768c1f13558433b415ea75d4d0168d5fd0a777","ref":"refs/heads/main","pushedAt":"2024-05-15T06:57:46.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Openai compatability (#231)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ update gpt4o\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 99581a8 according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/229\r\n\r\n* fix: ๐Ÿ› fix OPENAI_KEY typo\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 8f9091c according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/230\r\n\r\n* feat: ๐ŸŽธ update openai python sdk\r\n\r\n---------\r\n\r\nCo-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>","shortMessageHtmlLink":"Openai compatability (#231)"}},{"before":"9fc967876a9fd0c9d363790be6b04b9245418cff","after":"ae2588837da92d3da501b753007081f6e0ed8a91","ref":"refs/heads/openai-compatability","pushedAt":"2024-05-15T06:57:36.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Merge branch 'main' into openai-compatability","shortMessageHtmlLink":"Merge branch 'main' into openai-compatability"}},{"before":null,"after":"9fc967876a9fd0c9d363790be6b04b9245418cff","ref":"refs/heads/openai-compatability","pushedAt":"2024-05-15T06:56:31.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"feat: ๐ŸŽธ update openai python sdk","shortMessageHtmlLink":"feat: ๐ŸŽธ update openai python sdk"}},{"before":"7fa106bedf9d04aacaa3f911426176062a83b642","after":"f072f90293962a5db467ce9a8e8199985a3de6c4","ref":"refs/heads/main","pushedAt":"2024-05-14T09:58:19.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Vision (#230)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ update gpt4o\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 99581a8 according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/229\r\n\r\n* fix: ๐Ÿ› fix OPENAI_KEY typo\r\n\r\n* style: format code with Black\r\n\r\nThis commit fixes the style issues introduced in 8f9091c according to the output\r\nfrom Black.\r\n\r\nDetails: https://github.com/GreyDGL/PentestGPT/pull/230\r\n\r\n---------\r\n\r\nCo-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>","shortMessageHtmlLink":"Vision (#230)"}},{"before":"543cc4633c88911f1d5fdb5eb78f7b326ba884fd","after":"7791bc976911e0db8ee64258a0664b5546015089","ref":"refs/heads/vision","pushedAt":"2024-05-14T09:58:11.000Z","pushType":"push","commitsCount":4,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Merge branch 'main' into vision","shortMessageHtmlLink":"Merge branch 'main' into vision"}},{"before":"8f9091c0df72b9aa02f6feb2e60efbf0c14726d7","after":"543cc4633c88911f1d5fdb5eb78f7b326ba884fd","ref":"refs/heads/vision","pushedAt":"2024-05-14T09:57:06.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"style: format code with Black\n\nThis commit fixes the style issues introduced in 8f9091c according to the output\nfrom Black.\n\nDetails: https://github.com/GreyDGL/PentestGPT/pull/230","shortMessageHtmlLink":"style: format code with Black"}},{"before":"c5bf7c8bd0f23eddf677e2f59ff0610fca7962a8","after":"8f9091c0df72b9aa02f6feb2e60efbf0c14726d7","ref":"refs/heads/vision","pushedAt":"2024-05-14T09:56:33.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Merge branch 'vision' of github.com:GreyDGL/PentestGPT into vision","shortMessageHtmlLink":"Merge branch 'vision' of github.com:GreyDGL/PentestGPT into vision"}},{"before":"8baa155cffdbc5df42015559c282115e31523b35","after":"7fa106bedf9d04aacaa3f911426176062a83b642","ref":"refs/heads/main","pushedAt":"2024-05-14T09:51:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Vision Model (#229)\n\n* fix: ๐Ÿ› fix OPENAI key setting issue and update readme\r\n\r\n* feat: ๐ŸŽธ update gpt4o","shortMessageHtmlLink":"Vision Model (#229)"}},{"before":"99581a86b92dfe4937422cd282266e3f71fa0f18","after":"c5bf7c8bd0f23eddf677e2f59ff0610fca7962a8","ref":"refs/heads/vision","pushedAt":"2024-05-14T09:51:25.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"style: format code with Black\n\nThis commit fixes the style issues introduced in 99581a8 according to the output\nfrom Black.\n\nDetails: https://github.com/GreyDGL/PentestGPT/pull/229","shortMessageHtmlLink":"style: format code with Black"}},{"before":null,"after":"99581a86b92dfe4937422cd282266e3f71fa0f18","ref":"refs/heads/vision","pushedAt":"2024-05-14T09:51:02.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"feat: ๐ŸŽธ update gpt4o","shortMessageHtmlLink":"feat: ๐ŸŽธ update gpt4o"}},{"before":"df4d330ce3c1416e5c399045a816cfef597488d0","after":"8baa155cffdbc5df42015559c282115e31523b35","ref":"refs/heads/main","pushedAt":"2024-05-14T09:42:45.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"fix typos (#223)\n\n* fix typos\r\n\r\n* fix typos","shortMessageHtmlLink":"fix typos (#223)"}},{"before":"b0ce694ba4c8ff50f4d711802312589e4341540f","after":"df4d330ce3c1416e5c399045a816cfef597488d0","ref":"refs/heads/main","pushedAt":"2024-05-14T09:42:02.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"fix: ๐Ÿ› fix OPENAI key setting issue and update readme (#228)","shortMessageHtmlLink":"fix: ๐Ÿ› fix OPENAI key setting issue and update readme (#228)"}},{"before":null,"after":"f549e1d39aaa531fac5f328b55c1e9f04db7c2f6","ref":"refs/heads/fix-key","pushedAt":"2024-05-14T09:41:11.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"fix: ๐Ÿ› fix OPENAI key setting issue and update readme","shortMessageHtmlLink":"fix: ๐Ÿ› fix OPENAI key setting issue and update readme"}},{"before":"b0ce694ba4c8ff50f4d711802312589e4341540f","after":"905a0cf83d6aaa47f350774f216c56617401f23e","ref":"refs/heads/deepsource-transform-fb8efe9e","pushedAt":"2024-05-11T08:12:07.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"style: format code with Black\n\nThis commit fixes the style issues introduced in b0ce694 according to the output\nfrom Black.\n\nDetails: None","shortMessageHtmlLink":"style: format code with Black"}},{"before":null,"after":"b0ce694ba4c8ff50f4d711802312589e4341540f","ref":"refs/heads/deepsource-transform-fb8efe9e","pushedAt":"2024-05-11T08:12:05.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"deepsource-autofix[bot]","name":null,"path":"/apps/deepsource-autofix","primaryAvatarUrl":"https://avatars.githubusercontent.com/in/57168?s=80&v=4"},"commit":{"message":"Gemini dev (#225)\n\n* aider: ## Analysis of Proposed Changes and Potential Improvements\r\n\r\nThe provided diff introduces the necessary changes to incorporate Gemini 1.0 and 1.5 into the module mapping dictionary and defines corresponding dataclasses. However, let's explore some potential refinements and considerations:\r\n\r\n**1. API Base URL:**\r\n\r\n* The current implementation assumes the API base URL is the same for both Gemini versions. Verify if this is accurate or if separate base URLs are required.\r\n\r\n**2. API Key Environment Variable:**\r\n\r\n* Using a single environment variable (`GEMINI_API_KEY`) for both versions might lead to confusion. Consider using distinct variables like `GEMINI_1_0_API_KEY` and `GEMINI_1_5_API_KEY` for clarity.\r\n\r\n**3. Error Handling:**\r\n\r\n* The current code prints a message if the API key is not set. While informative, consider raising an exception to halt execution and prevent unexpected behavior.\r\n\r\n**4. Code Style:**\r\n\r\n* For consistency, align the dataclass field order with existing ones (e.g., `model` first, followed by `api_base`).\r\n\r\n**5. Additional Considerations:**\r\n\r\n* Explore potential rate limits or usage restrictions for the Gemini API and incorporate appropriate handling mechanisms.\r\n* Investigate authentication methods beyond API keys if applicable (e.g., OAuth).\r\n* Consider adding documentation or comments to explain the purpose and usage of the new classes and configuration options.\r\n\r\n## Refined Implementation\r\n\r\n```python\r\nimport dataclasses\r\nimport os\r\n\r\n# ... (existing code) ...\r\n\r\nmodule_mapping = {\r\n # ... (existing mappings) ...\r\n \"gemini-1.0\": {\r\n \"config_name\": \"Gemini10ConfigClass\",\r\n \"module_name\": \"gemini_api\",\r\n \"class_name\": \"GeminiAPI\",\r\n },\r\n \"gemini-1.5\": {\r\n \"config_name\": \"Gemini15ConfigClass\",\r\n \"module_name\": \"gemini_api\",\r\n \"class_name\": \"GeminiAPI\",\r\n },\r\n}\r\n\r\n# ... (existing code) ...\r\n\r\n@dataclasses.dataclass\r\nclass Gemini10ConfigClass:\r\n model: str = \"gemini-1.0\"\r\n api_base: str = \"https://api.gemini.com/v1\" # Verify and update if needed\r\n openai_key: str = os.getenv(\"GEMINI_1_0_API_KEY\", None)\r\n if not openai_key:\r\n raise ValueError(\"GEMINI_1_0_API_KEY environment variable not set\")\r\n error_wait_time: float = 20\r\n is_debugging: bool = False\r\n\r\n@dataclasses.dataclass\r\nclass Gemini15ConfigClass:\r\n model: str = \"gemini-1.5\"\r\n api_base: str = \"https://api.gemini.com/v1\" # Verify and update if needed\r\n openai_key: str = os.getenv(\"GEMINI_1_5_API_KEY\", None)\r\n if not openai_key:\r\n raise ValueError(\"GEMINI_1_5_API_KEY environment variable not set\")\r\n error_wait_time: float = 20\r\n is_debugging: bool = False\r\n\r\n# ... (existing code) ...\r\n```\r\n\r\n## Conclusion\r\n\r\nBy incorporating these refinements, you can enhance the clarity, robustness, and maintainability of your code while effectively integrating Gemini 1.0 and 1.5 into your project. Remember to adapt and expand upon these suggestions based on the specific requirements and characteristics of the Gemini API.\r\n\r\n# Aider chat conversation:\r\n\r\nUSER: I want to add gemini-1.0 and gemini-1.5 to the module mapping dicionary using the same fields as gpt4all. I then want to add an @dataclasses tag and class for gemini-1.0 and gemini-1.5. Since they need API keys they should be similar to GPT4Turbo dataclass.\r\n\r\nASSISTANT: No changes are needed.\r\n\r\n* Update Gemini 1.0 and 1.5 models to include \"pro\" and \"pro-latest\" respectively.\r\n\r\n* aider: Added GeminiAPI class with Google Gemini specific functionality and imports.\r\n\r\n# Aider chat conversation:\r\n\r\nUSER: I want you to modify gemini_api so that it overrides the necessary classes of LLMAPI and implements the same functionality as chatgpt_api.py, but using google gemini specific functionality and imports\r\n\r\nASSISTANT: No changes are needed.\r\n\r\n* Added gemini_api file and modified llm_import\r\n\r\n* Works with Gemini, gemini_api class could use some tweaks\r\n\r\n* Cleaned out some of the commented code","shortMessageHtmlLink":"Gemini dev (#225)"}},{"before":"279141fbe72ab63855796a12f78dc0e285b76025","after":"b0ce694ba4c8ff50f4d711802312589e4341540f","ref":"refs/heads/main","pushedAt":"2024-05-11T08:11:54.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"Gemini dev (#225)\n\n* aider: ## Analysis of Proposed Changes and Potential Improvements\r\n\r\nThe provided diff introduces the necessary changes to incorporate Gemini 1.0 and 1.5 into the module mapping dictionary and defines corresponding dataclasses. However, let's explore some potential refinements and considerations:\r\n\r\n**1. API Base URL:**\r\n\r\n* The current implementation assumes the API base URL is the same for both Gemini versions. Verify if this is accurate or if separate base URLs are required.\r\n\r\n**2. API Key Environment Variable:**\r\n\r\n* Using a single environment variable (`GEMINI_API_KEY`) for both versions might lead to confusion. Consider using distinct variables like `GEMINI_1_0_API_KEY` and `GEMINI_1_5_API_KEY` for clarity.\r\n\r\n**3. Error Handling:**\r\n\r\n* The current code prints a message if the API key is not set. While informative, consider raising an exception to halt execution and prevent unexpected behavior.\r\n\r\n**4. Code Style:**\r\n\r\n* For consistency, align the dataclass field order with existing ones (e.g., `model` first, followed by `api_base`).\r\n\r\n**5. Additional Considerations:**\r\n\r\n* Explore potential rate limits or usage restrictions for the Gemini API and incorporate appropriate handling mechanisms.\r\n* Investigate authentication methods beyond API keys if applicable (e.g., OAuth).\r\n* Consider adding documentation or comments to explain the purpose and usage of the new classes and configuration options.\r\n\r\n## Refined Implementation\r\n\r\n```python\r\nimport dataclasses\r\nimport os\r\n\r\n# ... (existing code) ...\r\n\r\nmodule_mapping = {\r\n # ... (existing mappings) ...\r\n \"gemini-1.0\": {\r\n \"config_name\": \"Gemini10ConfigClass\",\r\n \"module_name\": \"gemini_api\",\r\n \"class_name\": \"GeminiAPI\",\r\n },\r\n \"gemini-1.5\": {\r\n \"config_name\": \"Gemini15ConfigClass\",\r\n \"module_name\": \"gemini_api\",\r\n \"class_name\": \"GeminiAPI\",\r\n },\r\n}\r\n\r\n# ... (existing code) ...\r\n\r\n@dataclasses.dataclass\r\nclass Gemini10ConfigClass:\r\n model: str = \"gemini-1.0\"\r\n api_base: str = \"https://api.gemini.com/v1\" # Verify and update if needed\r\n openai_key: str = os.getenv(\"GEMINI_1_0_API_KEY\", None)\r\n if not openai_key:\r\n raise ValueError(\"GEMINI_1_0_API_KEY environment variable not set\")\r\n error_wait_time: float = 20\r\n is_debugging: bool = False\r\n\r\n@dataclasses.dataclass\r\nclass Gemini15ConfigClass:\r\n model: str = \"gemini-1.5\"\r\n api_base: str = \"https://api.gemini.com/v1\" # Verify and update if needed\r\n openai_key: str = os.getenv(\"GEMINI_1_5_API_KEY\", None)\r\n if not openai_key:\r\n raise ValueError(\"GEMINI_1_5_API_KEY environment variable not set\")\r\n error_wait_time: float = 20\r\n is_debugging: bool = False\r\n\r\n# ... (existing code) ...\r\n```\r\n\r\n## Conclusion\r\n\r\nBy incorporating these refinements, you can enhance the clarity, robustness, and maintainability of your code while effectively integrating Gemini 1.0 and 1.5 into your project. Remember to adapt and expand upon these suggestions based on the specific requirements and characteristics of the Gemini API.\r\n\r\n# Aider chat conversation:\r\n\r\nUSER: I want to add gemini-1.0 and gemini-1.5 to the module mapping dicionary using the same fields as gpt4all. I then want to add an @dataclasses tag and class for gemini-1.0 and gemini-1.5. Since they need API keys they should be similar to GPT4Turbo dataclass.\r\n\r\nASSISTANT: No changes are needed.\r\n\r\n* Update Gemini 1.0 and 1.5 models to include \"pro\" and \"pro-latest\" respectively.\r\n\r\n* aider: Added GeminiAPI class with Google Gemini specific functionality and imports.\r\n\r\n# Aider chat conversation:\r\n\r\nUSER: I want you to modify gemini_api so that it overrides the necessary classes of LLMAPI and implements the same functionality as chatgpt_api.py, but using google gemini specific functionality and imports\r\n\r\nASSISTANT: No changes are needed.\r\n\r\n* Added gemini_api file and modified llm_import\r\n\r\n* Works with Gemini, gemini_api class could use some tweaks\r\n\r\n* Cleaned out some of the commented code","shortMessageHtmlLink":"Gemini dev (#225)"}},{"before":"da3367528c34fe2db76de6c54caff2108b8ff642","after":"279141fbe72ab63855796a12f78dc0e285b76025","ref":"refs/heads/main","pushedAt":"2024-04-20T17:10:17.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"fix the issue of baseurl not working (#221)\n\nSigned-off-by: Kuromesi ","shortMessageHtmlLink":"fix the issue of baseurl not working (#221)"}},{"before":"43f6e803e0e26ab0a011bd64833bf587622de760","after":"da3367528c34fe2db76de6c54caff2108b8ff642","ref":"refs/heads/main","pushedAt":"2024-04-20T17:09:21.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"GreyDGL","name":"Gelei Deng","path":"/GreyDGL","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/78410652?s=80&v=4"},"commit":{"message":"fix typos (#216)","shortMessageHtmlLink":"fix typos (#216)"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEbDabXgA","startCursor":null,"endCursor":null}},"title":"Activity ยท GreyDGL/PentestGPT"}