Skip to content

Commit

Permalink
Update nsql: swithc to LLama with tools support
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrebnov committed Jan 21, 2025
1 parent cd8532b commit ff12af1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions text-to-sql/.env
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
SPICE_OPENAI_API_KEY=<your_openai_api_key>
SPICE_HF_TOKEN="your_huggingface_api_key"
5 changes: 4 additions & 1 deletion text-to-sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,12 @@ curl -XPOST "http://localhost:8090/v1/nsql" \
}'
```

## (Optional) Use a Local Model

### Prerequisites

## (Optional) Use a Local Model
- Get access to the [Llama-3.2-3B-Instruct model](https://huggingface.co/meta-llama/Llama-3.2-3B-Instruct).
- Populate `.env`: update `SPICE_HF_TOKEN` with your [HuggingFace User Access Token](https://huggingface.co/settings/tokens).

**Step 1.** In the `spicepod.yaml`, uncomment the model `local`.

Expand Down
4 changes: 2 additions & 2 deletions text-to-sql/spicepod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ models:
params:
openai_api_key: ${ secrets:SPICE_OPENAI_API_KEY }
# - name: local
# from: huggingface:huggingface.co/microsoft/Phi-3.5-mini-instruct
# from: huggingface:huggingface.co/meta-llama/Llama-3.2-3B-Instruct
# params:
# model_type: phi3
# token: ${ secrets:SPICE_HF_TOKEN }

0 comments on commit ff12af1

Please sign in to comment.