azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Terminal command just to upload and parse new documents in DATA folder

Open infinitelyloopy-bt opened this issue 2 years ago • 3 comments

Please provide us with the following information:

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

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

Minimal steps to reproduce

I want to update my local DATA folder and then run a command just to parse the new documents, upload it to blob, index it. Instead of running AZD UP and going through the whole steps to recompile and go through all the steps from scratch. What is the terminal command I can use just to parse the documents and upload it, and run indexing on it?

OS and Version?

macOS and VS Code using Python and macOS Terminal

azd version?

azd up

infinitelyloopy-bt avatar Jun 09 '23 00:06 infinitelyloopy-bt

For Mac/Linux, run:

./scripts/prepdocs.sh

For Windows:

./scripts/prepdocs.ps1

You can see that they are the postprovision hooks in azure.yaml.

And if you want to deploy just new code, run azd deploy. You only need azd up if you are also changing the infrastructure.

pamelafox avatar Jun 09 '23 16:06 pamelafox

Thank you so much! I did follow your instructions but received this error:

Running "prepdocs.py" ./scripts/.venv/bin/python: can't open file '/Users/bakertamory/App Dev/Microsoft/Azure Search OpenAI DEMO/azure-search-openai-demo/scripts/./scripts/prepdocs.py': [Errno 2] No such file or directory

infinitelyloopy-bt avatar Jun 10 '23 00:06 infinitelyloopy-bt

There's some path related issue. What command did you run exactly before getting that error? Could you possibly open the project up in Github Codespaces or a Dev Container in VS Code? (That can sometimes help with standardizing the environment)

pamelafox avatar Jun 12 '23 19:06 pamelafox

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Dec 20 '23 01:12 github-actions[bot]