TypeError: 'type' object is not subscriptable while Starting Backend

Chhanechhara, Milin 100 Reputation points

I am initializing azure-search-openai-demo project locally using ./start.sh command and here is the error I am getting from app.py. Here is the error log below:

Building frontend

> frontend@0.0.0 build
> tsc && vite build

vite v4.1.1 building for production...
✓ 1250 modules transformed.
../backend/static/index.html                    0.47 kB
../backend/static/assets/github-fab00c2d.svg    0.96 kB
../backend/static/assets/index-2fb53ec2.css     7.44 kB │ gzip:   2.19 kB
../backend/static/assets/index-7abdfda7.js    625.74 kB │ gzip: 204.86 kB │ map: 5,054.95 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

Starting backend

Traceback (most recent call last):
  File "./app.py", line 12, in <module>
    from approaches.chatreadretrieveread import ChatReadRetrieveReadApproach
  File "/home/milin/azure-search-openai-demo/app/backend/approaches/chatreadretrieveread.py", line 10, in <module>
    class ChatReadRetrieveReadApproach(Approach):
  File "/home/milin/azure-search-openai-demo/app/backend/approaches/chatreadretrieveread.py", line 51, in ChatReadRetrieveReadApproach
    def run(self, history: list[dict], overrides: dict) -> any:
TypeError: 'type' object is not subscriptable
Failed to start backend
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,639 questions
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 15,951 Reputation points

    Hi @Chhanechhara, Milin , Thanks for using Microsoft Q&A Platform.

    Could you please confirm the python version being used for this project? Try using Python 3.10 and see.

    Also, please refer here for similar kind of issues and let us know if that helps: https://github.com/Azure-Samples/azure-search-openai-demo/issues/142

    I hope this helps.


    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful