run-llama / create-llama

The easiest way to get started with LlamaIndex
MIT License
799 stars 96 forks source link

poetry run generate not working #203

Closed balasubramaniam-ramasamy closed 1 month ago

balasubramaniam-ramasamy commented 1 month ago

Hi Team

I generate the app with fastApi option. It contains backend folder. And inside another folder data and a sample pdf file.

In my terminal poetry install poetry shell

Above commands works However, poetry run generate is not working

It reponds 'generate' is not recognized as an internal or external command, operable program or batch file.

Can you pleas help what's wrong?

I am able run "python main.py" and in localhost, I can see the "swagger" and able to call the "chat" api but the it also says "do run generate first".

Kindly help!

I am from front-end development but developing UI for AI team. So, this domain is new for me.

Thanks

balasubramaniam-ramasamy commented 1 month ago

@marcusschiesser Hi generated using fastapi backend

marcusschiesser commented 1 month ago

what version of poetry are you using?

balasubramaniam-ramasamy commented 1 month ago

Poetry version is 1.8.3

I manually copied from 'generate.py' from 'create-llama\templates\types\streaming\fastapi\app\engine' and seemed to resolve that error.

marcusschiesser commented 1 month ago

@balasubramaniam-ramasamy works for me, I tried:

npx create-llama@latest
✔ What is your project named? … test
✔ Which template would you like to use? › Agentic RAG (single agent)
✔ Which framework would you like to use? › FastAPI (Python)
✔ Would you like to generate a NextJS frontend for your FastAPI (Python) backend? … No / Yes
✔ Would you like to set up observability? › No
✔ Please provide your OpenAI API key (leave blank to skip): …
✔ Which data source would you like to use? › Use an example PDF
✔ Would you like to add another data source? › No
✔ Would you like to use LlamaParse (improved parser for RAG - requires API key)? … no / yes
✔ Would you like to use a vector database? › No, just store the data in the file system
✔ Would you like to build an agent using tools? If so, select the tools here, otherwise just press enter ›
✔ How would you like to proceed? › Just generate code (~1 sec)
Creating a new LlamaIndex app in /Users/marcus/1/test.
cd test/backend/
poetry install
poetry run generate

Can you send a similar test case? Thanks

balasubramaniam-ramasamy commented 1 month ago

Thanks for checking, @marcusschiesser

I tried it again - it seems the issue not reproducible. Looks I I tried some combination with fastapi but recall it. Hence, closing the ticket.