Open BrahianVT opened 8 months ago
mmm, the value for code_summaries is: 404 models/gpt-3.5-turbo is not found for API version v1beta, or is not supported for GenerateContent. Call ListModels to see the list of available models and their supported methods. as
(readmeai) C:\Users\BrahianVT\Desktop\python\readme-ai>python -m readmeai.cli.main --api GEMINI -r https://github.com/eli64s/readme-ai ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/blacklist.toml ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/commands.toml ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/languages.toml ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/markdown.toml ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/parsers.toml ► INFO | 2024-03-15 14:21:09 | readmeai.config.settings | Loaded configuration file: settings/prompts.toml ► INFO | 2024-03-15 14:21:09 | readmeai.core.utils | GEMINI settings FOUND in environment! ► INFO | 2024-03-15 14:21:09 | readmeai._agent | Repository validated: repository='https://github.com/eli64s/readme-ai' full_name='eli64s/readme-ai' host_domain='github.com' host='github' name='readme-ai' ► INFO | 2024-03-15 14:21:09 | readmeai._agent | LLM API settings: api='GEMINI' base_url='https://api.openai.com/v1/chat/completions' context_window=3999 encoder='cl100k_base' model='gpt-3.5-turbo' temperature=0.9 tokens=650 top_p=0.9 C:\Users\BrahianVT\miniconda3\envs\readmeai\Lib\shutil.py:648: RuntimeWarning: coroutine 'handleRemoveReadonly' was never awaited onexc(os.unlink, fullname, err) RuntimeWarning: Enable tracemalloc to get the object allocation traceback C:\Users\BrahianVT\miniconda3\envs\readmeai\Lib\shutil.py:652: RuntimeWarning: coroutine 'handleRemoveReadonly' was never awaited onexc(os.rmdir, path, err) RuntimeWarning: Enable tracemalloc to get the object allocation traceback ► INFO | 2024-03-15 14:21:14 | readmeai.core.preprocess | Dependency file found: Dockerfile: [('python', '3.10-slim-buster')] ► INFO | 2024-03-15 14:21:14 | readmeai.core.preprocess | Dependency file found: pyproject.toml: ['python', 'aiohttp', 'click', 'gitpython', 'google-generativeai', 'openai', 'pydantic', 'pyyaml', 'tenacity', 'tiktoken', 'toml', 'ruff', 'pytest', 'pytest-asyncio', 'pytest-cov', 'pytest-randomly', 'pytest-sugar', 'pytest-xdist', 'mkdocs', 'mkdocs-material'] ► INFO | 2024-03-15 14:21:14 | readmeai.core.preprocess | Dependency file found: environment.yaml: ['python', 'pip', '-r requirements.txt'] ► INFO | 2024-03-15 14:21:14 | readmeai.core.preprocess | Dependency file found: requirements.txt: ['aiohttp', 'aiosignal', 'anyio', 'async-timeout', 'attrs', 'cachetools', 'certifi', 'charset-normalizer', 'click', 'colorama', 'distro', 'exceptiongroup', 'frozenlist', 'gitdb', 'gitpython', 'google-ai-generativelanguage', 'google-api-core', 'google-api-core', 'google-auth', 'google-generativeai', 'googleapis-common-protos', 'grpcio-status', 'grpcio', 'h11', 'httpcore', 'httpx', 'idna', 'multidict', 'openai', 'proto-plus', 'protobuf', 'pyasn1-modules', 'pyasn1', 'pydantic', 'pyyaml', 'regex', 'requests', 'rsa', 'smmap', 'sniffio', 'tenacity', 'tiktoken', 'toml', 'tqdm', 'typing-extensions', 'urllib3', 'yarl'] ► INFO | 2024-03-15 14:21:14 | readmeai.core.preprocess | Dependencies: {'Dockerfile': [('python', '3.10-slim-buster')], 'Makefile': [], 'poetry.lock': [], 'pyproject.toml': ['python', 'aiohttp', 'click', 'gitpython', 'google-generativeai', 'openai', 'pydantic', 'pyyaml', 'tenacity', 'tiktoken', 'toml', 'ruff', 'pytest', 'pytest-asyncio', 'pytest-cov', 'pytest-randomly', 'pytest-sugar', 'pytest-xdist', 'mkdocs', 'mkdocs-material'], 'environment.yaml': ['python', 'pip', '-r requirements.txt'], 'requirements.txt': ['aiohttp', 'aiosignal', 'anyio', 'async-timeout', 'attrs', 'cachetools', 'certifi', 'charset-normalizer', 'click', 'colorama', 'distro', 'exceptiongroup', 'frozenlist', 'gitdb', 'gitpython', 'google-ai-generativelanguage', 'google-api-core', 'google-api-core', 'google-auth', 'google-generativeai', 'googleapis-common-protos', 'grpcio-status', 'grpcio', 'h11', 'httpcore', 'httpx', 'idna', 'multidict', 'openai', 'proto-plus', 'protobuf', 'pyasn1-modules', 'pyasn1', 'pydantic', 'pyyaml', 'regex', 'requests', 'rsa', 'smmap', 'sniffio', 'tenacity', 'tiktoken', 'toml', 'tqdm', 'typing-extensions', 'urllib3', 'yarl']} ► INFO | 2024-03-15 14:21:14 | readmeai._agent | Total files analyzed: 80 ► INFO | 2024-03-15 14:21:14 | readmeai._agent | Dependencies found: ['', 'lock', 'google-auth', 'tenacity', 'smmap', 'yaml', 'pip', 'gitdb', 'multidict', 'toml', 'Makefile', 'exceptiongroup', 'colorama', 'tiktoken', 'Dockerfile', 'google-api-core', 'anyio', 'charset-normalizer', 'idna', 'urllib3', 'async-timeout', 'pyyaml', 'certifi', 'environment.yaml', 'python', 'httpcore', 'mkdocs-material', 'sniffio', 'googleapis-common-protos', 'cachetools', 'openai', 'h11', 'protobuf', 'google-ai-generativelanguage', 'proto-plus', 'pytest', 'gitpython', 'shell', 'distro', 'poetry.lock', 'ruff', 'grpcio-status', 'pyasn1', 'pyproject.toml', 'txt', 'httpx', 'requests', 'frozenlist', 'tqdm', 'regex', '-r requirements.txt', 'typing-extensions', 'mkdocs', 'rsa', 'py', 'google-generativeai', 'pyasn1-modules', 'requirements.txt', 'pytest-xdist', 'pytest-asyncio', 'pydantic', ('python', '3.10-slim-buster'), 'sh', 'aiosignal', 'text', 'pytest-randomly', 'yarl', 'yml', 'pytest-sugar', 'grpcio', 'attrs', 'click', 'pytest-cov', 'aiohttp'] 404 models/gpt-3.5-turbo is not found for API version v1beta, or is not supported for GenerateContent. Call ListModels to see the list of available models and their supported methods. Traceback (most recent call last): File "C:\Users\BrahianVT\Desktop\python\readme-ai\readmeai_agent.py", line 77, in readme_agent asyncio.run(readme_generator(conf, output_file)) File "C:\Users\BrahianVT\miniconda3\envs\readmeai\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Users\BrahianVT\miniconda3\envs\readmeai\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\BrahianVT\miniconda3\envs\readmeai\Lib\asyncio\base_events.py", line 685, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Users\BrahianVT\Desktop\python\readme-ai\readmeai_agent.py", line 122, in readme_generator ).build() ^^^^^^^ File "C:\Users\BrahianVT\Desktop\python\readme-ai\readmeai\generators\builder.py", line 121, in build self.md_summaries, ^^^^^^^^^^^^^^^^^ File "C:\Users\BrahianVT\Desktop\python\readme-ai\readmeai\generators\builder.py", line 65, in md_summaries summaries = tables.format_code_summaries( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\BrahianVT\Desktop\python\readme-ai\readmeai\generators\tables.py", line 59, in format_code_summaries for summary in code_summaries: TypeError: 'NotFound' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "
I`m having a similar issue here.
Using the following command:
readmeai --repository ./ --api GEMINI
To generate a readme-ai.md
in a private repository. I have a GOOGLE_API_KEY
env var properly set, however I'm having a very similar error:
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/blacklist.toml
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/commands.toml
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/languages.toml
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/markdown.toml
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/parsers.toml
► INFO | 2024-04-07 18:25:21 | readmeai.config.settings | Loaded configuration file: settings/prompts.toml
► INFO | 2024-04-07 18:25:21 | readmeai.core.utils | GEMINI settings FOUND in environment!
► INFO | 2024-04-07 18:25:21 | readmeai._agent | Repository validated: repository='.' full_name='' host_domain='local' host='local' name='.'
► INFO | 2024-04-07 18:25:21 | readmeai._agent | LLM API settings: api='GEMINI' base_url='https://api.openai.com/v1/chat/completions' context_window=3999 encoder='cl100k_base' model='gpt-3.5-turbo' temperature=0.9 tokens=650 top_p=0.9
► INFO | 2024-04-07 18:25:21 | readmeai.core.preprocess | Dependencies: {}
► INFO | 2024-04-07 18:25:21 | readmeai._agent | Total files analyzed: 52
► INFO | 2024-04-07 18:25:21 | readmeai._agent | Dependencies found: ['', 'yaml', 'keep', 'yml']
Traceback (most recent call last):
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/_agent.py", line 77, in readme_agent
asyncio.run(readme_generator(conf, output_file))
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/base_events.py", line 650, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/_agent.py", line 122, in readme_generator
).build()
^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/builder.py", line 121, in build
self.md_summaries,
^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/builder.py", line 65, in md_summaries
summaries = tables.format_code_summaries(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/tables.py", line 58, in format_code_summaries
for summary in code_summaries:
TypeError: 'NotFound' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/paladini/.pyenv/versions/3.11.0/bin/readmeai", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/cli/main.py", line 51, in main
readme_agent(
File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/_agent.py", line 80, in readme_agent
raise ReadmeGeneratorError(exc, traceback.format_exc()) from exc
readmeai._exceptions.ReadmeGeneratorError: ("Error generating readme: 'NotFound' object is not iterable", 'Traceback (most recent call last):\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/_agent.py", line 77, in readme_agent\n asyncio.run(readme_generator(conf, output_file))\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/runners.py", line 190, in run\n return runner.run(main)\n ^^^^^^^^^^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/runners.py", line 118, in run\n return self._loop.run_until_complete(task)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/asyncio/base_events.py", line 650, in run_until_complete\n return future.result()\n ^^^^^^^^^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/_agent.py", line 122, in readme_generator\n ).build()\n ^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/builder.py", line 121, in build\n self.md_summaries,\n ^^^^^^^^^^^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/builder.py", line 65, in md_summaries\n summaries = tables.format_code_summaries(\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/paladini/.pyenv/versions/3.11.0/lib/python3.11/site-packages/readmeai/generators/tables.py", line 58, in format_code_summaries\n for summary in code_summaries:\nTypeError: \'NotFound\' object is not iterable\n')
Can you help us @eli64s ?
Not sure if is because of GEMINI or using windows or for anything else:
anyone had this issue before: