Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ env/
.flaskenv
*.pyc
*.pyo
.ipynb_checkpoints
.ipynb_checkpoints
agent/.env
agent/node_modules/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ END

AS y -- the povertyBinary for >= 2% in coming year, and no decline for current year.
-->

## Fallback Mode

If the Gemini API key has no available quota, the assistant returns a fallback YAML example for local testing.

This allows contributors to test the API route without requiring paid API usage.
2 changes: 2 additions & 0 deletions agent/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
GEMINI_API_KEY=AIzaSyBnHpHxXoQ2RQNEdpJISlp5zxOOYeZrln0
PORT=3000
58 changes: 58 additions & 0 deletions agent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# RealityStream AI Assistant Agent

This is a small Node.js AI assistant for RealityStream.

## Purpose

The assistant helps users:

- Generate `parameters.yaml` examples
- Recommend suitable ML models
- Understand local and Colab run steps
- Explain model outputs and feature importance

## Setup

```bash
cd agent
npm install
cp .env.example .env
```

Add your OpenAI API key in `.env`.

## Run

```bash
npm start
```

The server runs at:

```text
http://localhost:3000
```

## Test

```bash
curl -X POST http://localhost:3000/agent ^
-H "Content-Type: application/json" ^
-d "{\"message\":\"Create YAML for bee density prediction in Maine for 2021 using Random Forest\"}"
```

## Example Output

```yaml
folder: naics6-bees-counties-simple
features:
data: industries
state: ME
startyear: 2021
endyear: 2021
naics:
- 2
targets:
data: bees
models: rfc
```
Loading