Skip to content

Commit 98f2019

Browse files
committed
fix: readme and generate workflow
1 parent e9231e1 commit 98f2019

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ The following is a template repo to get started with the Hatchet Python SDK. It
44

55
### Cloud Version
66

7-
Navigate to your settings tab in the Hatchet dashboard. You should see a section called "API Keys". Click "Create API Key", input a name for the key and copy the key. Then set the following environment variables:
7+
Navigate to your settings tab in the Hatchet dashboard. You should see a section called "API Keys". Click "Create API Key", input a name for the key and copy the key. Then copy the environment variable:
88

99
```
1010
HATCHET_CLIENT_TOKEN="<token>"
1111
```
1212

13-
Then start a worker via:
14-
15-
```
16-
poetry run python worker.py
17-
```
13+
You will need this in the examples.
1814

1915
**Next steps:** see [Running Workflows](#running-workflows) to trigger your first Hatchet workflow.
2016

@@ -33,12 +29,14 @@ Email: admin@example.com
3329
Password: Admin123!!
3430
```
3531

36-
Next, navigate to your settings tab in the Hatchet dashboard. You should see a section called "API Keys". Click "Create API Key", input a name for the key and copy the key. Then set the following environment variables:
32+
Next, navigate to your settings tab in the Hatchet dashboard. You should see a section called "API Keys". Click "Create API Key", input a name for the key and copy the key. Then copy the environment variable:
3733

3834
```
3935
HATCHET_CLIENT_TOKEN="<token>"
4036
```
4137

38+
You will need this in the examples.
39+
4240
**Next steps:** see [Running Workflows](#running-workflows) to trigger your first Hatchet workflow.
4341

4442
## Running Workflows

fast-api-react/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ Before running this project, make sure you have the following:
1313

1414
## Setup
1515

16-
1. Create a `.env` file in the project root directory and set the required environment variables.
16+
1. Create a `.env` file in the `./backend` directory and set the required environment variables.
1717

18-
This project requires the `HATCHET_CLIENT_TOKEN` variable created in the [Getting Started Readme](/README.md).
18+
This project requires the `HATCHET_CLIENT_TOKEN` variable created in the [Getting Started README](/README.md).
1919

2020
You will also need, a `OPENAI_API_KEY` which can be created on the [OpenAI Website](https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key).
2121

@@ -48,6 +48,6 @@ poetry run hatchet
4848
We've included a basic chat engine frontend to play with the example workflow. To run this script:
4949

5050
1. Open a new terminal window and cd into the `fast-api-react/frontend` directory.
51-
2. run `npx install`
52-
3. run `npx start`
51+
2. run `npm install`
52+
3. run `npm start`
5353
4. By default you can access the application in your browser at `http://localhost:3000` or by following the instructions in the terminal window.

fast-api-react/backend/src/workflows/generate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def reason_docs(self, ctx: Context):
4646

4747
prompt = prompt.format(message=message['content'], docs=docs)
4848

49-
model = ctx.overrides("gpt-3.5-turbo")
49+
model = ctx.overrides("model", "gpt-3.5-turbo")
5050

5151
completion = openai.chat.completions.create(
5252
model=model,
@@ -74,7 +74,7 @@ def generate_response(self, ctx: Context):
7474

7575
prompt = prompt.format(research=research)
7676

77-
model = ctx.overrides("gpt-3.5-turbo")
77+
model = ctx.overrides("model", "gpt-3.5-turbo")
7878

7979
completion = openai.chat.completions.create(
8080
model=model,

0 commit comments

Comments
 (0)