Skip to content

GPT4 - The API deployment for this resource does not exist. #526

@nickroseth

Description

@nickroseth

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Previously worked
Changed to using gpt-4
Occurs when doing original azd up or running prepdocs.

Any log messages given by the failure

Traceback (most recent call last):
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 216, in compute_embedding
return openai.Embedding.create(engine=args.openaideployment, input=text)["data"][0]["embedding"]
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/openai/api_resources/embedding.py", line 33, in create
response = super().create(*args, **kwargs)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 298, in request
resp, got_stream = self._interpret_response(result, stream)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 700, in _interpret_response
self._interpret_response_line(
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line
raise self.handle_error_response(
openai.error.InvalidRequestError: The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 367, in
index_sections(os.path.basename(filename), sections)
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 262, in index_sections
for s in sections:
File "/workspaces/azure-search-openai-demo/./scripts/prepdocs.py", line 208, in create_sections
section["embedding"] = compute_embedding(content)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/workspaces/azure-search-openai-demo/scripts/.venv/lib/python3.10/site-packages/tenacity/init.py", line 326, in iter
raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f5ebb9e8df0 state=finished raised InvalidRequestError>]

Expected/desired behavior

Normal Functionality
OpenAi resource is active with model named gpt-4

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.
azd version 1.1.0 (commit ea9cb12575734ee6a5f99c4d415c1a51d6f32d3e)

Versions

Mention any other details that might be useful

Front end app and all other resources deploy successfully.


Thanks! We'll be in touch soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions