https://github.com/nickyhavoc/neat-demo
neat is a ReAct-like agent accessing all sorts of data & APIs
https://github.com/nickyhavoc/neat-demo
chain-of-thought llm tool-use
Last synced: 3 months ago
JSON representation
neat is a ReAct-like agent accessing all sorts of data & APIs
- Host: GitHub
- URL: https://github.com/nickyhavoc/neat-demo
- Owner: NickyHavoc
- License: mit
- Created: 2023-05-01T13:35:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-26T10:09:37.000Z (almost 2 years ago)
- Last Synced: 2025-04-13T20:11:44.835Z (6 months ago)
- Topics: chain-of-thought, llm, tool-use
- Language: Python
- Homepage:
- Size: 56.8 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# neat
neat is a ReAct-like agent accessing all sorts of data & APIs

## Getting started
This project uses [Poetry](https://python-poetry.org/) for dependency management. If you haven't installed Poetry yet, you can do so by following the instructions on the official website.
Sidenote: poetry >>> conda & pip.
Once you have Poetry installed, you have 2 options.
### Include it in your dependencies
``` toml
[tool.poetry.dependencies]
neat-ai-assistant = {git = "https://github.com/NickyHavoc/neat-demo.git", branch="main"}
```Needless to say, you need poetry set up in your environment to do this.
Optionally, you can include some extra dependencies:
``` toml
neat-ai-assistant = {git = "https://github.com/NickyHavoc/neat-demo.git", branch="main", extras = ["tool-extension"]}
```### Clone the repo
```console
git clone https://github.com/NickyHavoc/neat-demo.git
cd neat-demo
poetry install
```If you want to use some extra tools that require special dependencies you can install them like so:
``` console
poetry install -E tool-extension
```## Create your `.env` file
In order to set credentials to the api that should never be pushed to a repository, copy the file ".env_example", rename the copy to ".env" and paste your personal API tokens.
At least, you must include your "OPENAI_API_KEY" here.## Launching the server
### Backend
This guide assumes that you have already installed FastAPI and an ASGI server like Uvicorn, which is required to run a FastAPI application.
If you haven't installed these yet, you can do so using poetry:``` console
poetry add fastapi uvicorn
```Navigate to Your Project Directory:
Open a terminal or command prompt and navigate to the directory where your main.py file is located.``` console
uvicorn main:app --reload
```Once the server is running, you should see output in the terminal indicating that it's live.
By default, the server will be available at `http://127.0.0.1:8000`.
You can use a tool like curl to interact with the API.API Documentation:
FastAPI automatically generates interactive API documentation for your server.
You can visit it at `http://127.0.0.1:8000/docs`.
This page will allow you to see all your endpoints and test them directly from the browser.### Frontend
Simply navigate to the `react-ui` directory and start npm, like so:
``` console
cd react-ui
npm start
```To learn more, check out the [frontend-readme](https://github.com/NickyHavoc/neat-demo/blob/main/react-ui/README.md).
## Run tests locally
To run tests use either of the following commands
```console
pytest # this by default runs all tests in tests/
pytest -v # run all tests verbose (see which test is currently running)
pytest -s # run all tests and print whatever the code would print
pytest -x # run all tests and stop after first failure
pytest -vsx # all of the above
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.