Skip to content

Commit

Permalink
getting started updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sharanshirodkar7 committed Apr 22, 2024
1 parent 49fcfa2 commit 4d0f803
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions fern/docs/pages/gettingstarted.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,12 @@ You can then use our Python client or REST API to prompt one of our LLMs!
```python filename="main.py"
import os
import json
import predictionguard as pg
from predictionguard import PredictionGuard

# Set your Prediction Guard token as an environmental variable.
os.environ["PREDICTIONGUARD_API_KEY"] = "<your access token>"

os.environ["PREDICTIONGUARD_TOKEN"] = "<your access token>"
client = PredictionGuard()

# Define our prompt.

Expand All @@ -73,7 +74,7 @@ messages = [
}
]

result = pg.Chat.create(
result = client.chat.completions.create(
model="Neural-Chat-7B",
messages=messages
)
Expand Down
2 changes: 1 addition & 1 deletion fern/docs/pages/guides/ada.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ For this demo we have selecteed a public dataset from Kaggle - Jobs and Salaries

## Installation and Setup
- Install the Python SDK with `pip install predictionguard`
- Get a Prediction Guard access token (as described [here](https://docs.predictionguard.com/)) and set it as the environment variable `PREDICTIONGUARD_TOKEN`.
- Get a Prediction Guard access token (as described [here](https://docs.predictionguard.com/)) and set it as the environment variable `PREDICTIONGUARD_API_KEY`.

## Setup

Expand Down

0 comments on commit 4d0f803

Please sign in to comment.