This is a great idea for a project BTW. Thanks!
I think that it simply might take the model more than 60s to create the package.json in my case. Full run (with prompt)
โฏ boilerplate-x -p "VSCode extension to make it easier to work with nbdev, a library that makes it easier to Write, test, document, and distribute software packages and technical articles from Jupyter notebooks" -o "./nbdev-vscode-extension-boilerplate"
[04/01/23 11:29:38] INFO INFO:boilerplate_x.cli:Welcome to Boilerplate-X CLI! cli.py:72
INFO INFO:boilerplate_x.cli:Generating project template... cli.py:31
INFO INFO:boilerplate_x.generator:Generating project structure... generator.py:60
[04/01/23 11:30:38] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 4.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[04/01/23 11:30:53] INFO INFO:boilerplate_x.generator:Generating file content: .gitignore... generator.py:70
[04/01/23 11:31:02] INFO INFO:boilerplate_x.generator:Generating file content: README.md... generator.py:70
[04/01/23 11:31:23] INFO INFO:boilerplate_x.generator:Generating file content: LICENSE... generator.py:70
[04/01/23 11:31:37] INFO INFO:boilerplate_x.generator:Generating file content: package.json... generator.py:70
[04/01/23 11:32:37] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 4.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[04/01/23 11:33:41] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 4.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[04/01/23 11:34:46] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 4.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[04/01/23 11:35:50] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 8.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
[04/01/23 11:36:58] WARNING WARNING:/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchai before_sleep.py:65
n/chat_models/openai.py:Retrying
langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_
retry in 10.0 seconds as it raised Timeout: Request timed out:
HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60).
Traceback (most recent call last):
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 449, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 444, in _make_request
httplib_response = conn.getresponse()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/http/client.py", line 1374, in getresponse
response.begin()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/http/client.py", line 318, in begin
version, status, reason = self._read_status()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/http/client.py", line 279, in _read_status
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/socket.py", line 705, in readinto
return self._sock.recv_into(b)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/ssl.py", line 1274, in recv_into
return self.read(nbytes, buffer)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/ssl.py", line 1130, in read
return self._sslobj.read(len, buffer)
TimeoutError: The read operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/packages/six.py", line 770, in reraise
raise value
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 451, in _make_request
self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/urllib3/connectionpool.py", line 340, in _raise_timeout
raise ReadTimeoutError(
urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/openai/api_requestor.py", line 516, in request_raw
result = _thread_context.session.request(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/requests/adapters.py", line 578, in send
raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/taytay/miniconda3/envs/boilerplate-x/bin/boilerplate-x", line 8, in <module>
sys.exit(main())
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/boilerplate_x/cli.py", line 128, in main
run(prompt, output_path, verbose, customisation_kwargs, github_repo_creator_kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/boilerplate_x/cli.py", line 32, in run
generator.generate_template()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/boilerplate_x/generator.py", line 47, in generate_template
self._generate_project_files(project_structure)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/boilerplate_x/generator.py", line 71, in _generate_project_files
file_content = self.project_file_chain.predict(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/llm.py", line 151, in predict
return self(kwargs)[self.output_key]
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/base.py", line 116, in __call__
raise e
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/base.py", line 113, in __call__
outputs = self._call(inputs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/llm.py", line 57, in _call
return self.apply([inputs])[0]
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/llm.py", line 118, in apply
response = self.generate(input_list)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chains/llm.py", line 62, in generate
return self.llm.generate_prompt(prompts, stop)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/base.py", line 79, in generate_prompt
raise e
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/base.py", line 76, in generate_prompt
output = self.generate(prompt_messages, stop=stop)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/base.py", line 53, in generate
results = [self._generate(m, stop=stop) for m in messages]
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/base.py", line 53, in <listcomp>
results = [self._generate(m, stop=stop) for m in messages]
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/openai.py", line 254, in _generate
response = self.completion_with_retry(messages=message_dicts, **params)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/openai.py", line 216, in completion_with_retry
return _completion_with_retry(**kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/tenacity/__init__.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
do = self.iter(retry_state=retry_state)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/tenacity/__init__.py", line 325, in iter
raise retry_exc.reraise()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/tenacity/__init__.py", line 158, in reraise
raise self.last_attempt.result()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/tenacity/__init__.py", line 382, in __call__
result = fn(*args, **kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/langchain/chat_models/openai.py", line 214, in _completion_with_retry
return self.client.create(**kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/openai/api_requestor.py", line 216, in request
result = self.request_raw(
File "/home/taytay/miniconda3/envs/boilerplate-x/lib/python3.10/site-packages/openai/api_requestor.py", line 526, in request_raw
raise error.Timeout("Request timed out: {}".format(e)) from e
openai.error.Timeout: Request timed out: HTTPSConnectionPool(host='api.openai.com', port=443): Read timed out. (read timeout=60)