mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-17 06:58:09 +01:00
uv run
This commit is contained in:
@@ -50,7 +50,7 @@ Default URLs:
|
|||||||
|
|
||||||
# Or manually:
|
# Or manually:
|
||||||
uv sync
|
uv sync
|
||||||
uv run python scripts/run_worker.py # In one terminal
|
uv run scripts/run_worker.py # In one terminal
|
||||||
uv run uvicorn api.main:app --reload # In another terminal
|
uv run uvicorn api.main:app --reload # In another terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -6,7 +6,7 @@ setup:
|
|||||||
|
|
||||||
# Run commands
|
# Run commands
|
||||||
run-worker:
|
run-worker:
|
||||||
uv run python scripts/run_worker.py
|
uv run scripts/run_worker.py
|
||||||
|
|
||||||
run-api:
|
run-api:
|
||||||
uv run uvicorn api.main:app --reload
|
uv run uvicorn api.main:app --reload
|
||||||
@@ -15,10 +15,10 @@ run-frontend:
|
|||||||
cd frontend && npx vite
|
cd frontend && npx vite
|
||||||
|
|
||||||
run-train-api:
|
run-train-api:
|
||||||
uv run python thirdparty/train_api.py
|
uv run thirdparty/train_api.py
|
||||||
|
|
||||||
run-legacy-worker:
|
run-legacy-worker:
|
||||||
uv run python scripts/run_legacy_worker.py
|
uv run scripts/run_legacy_worker.py
|
||||||
|
|
||||||
run-enterprise:
|
run-enterprise:
|
||||||
cd enterprise && dotnet build && dotnet run
|
cd enterprise && dotnet build && dotnet run
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ services:
|
|||||||
worker:
|
worker:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app:cached
|
- ./:/app:cached
|
||||||
command: uv run python scripts/run_worker.py
|
command: uv run scripts/run_worker.py
|
||||||
|
|
||||||
train-api:
|
train-api:
|
||||||
volumes:
|
volumes:
|
||||||
- ./:/app:cached
|
- ./:/app:cached
|
||||||
command: uv run python thirdparty/train_api.py
|
command: uv run thirdparty/train_api.py
|
||||||
|
|
||||||
frontend:
|
frontend:
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- TEMPORAL_ADDRESS=temporal:7233
|
- TEMPORAL_ADDRESS=temporal:7233
|
||||||
command: uv run python scripts/run_worker.py
|
command: uv run scripts/run_worker.py
|
||||||
networks:
|
networks:
|
||||||
- temporal-network
|
- temporal-network
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ services:
|
|||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- TEMPORAL_ADDRESS=temporal:7233
|
- TEMPORAL_ADDRESS=temporal:7233
|
||||||
command: uv run python thirdparty/train_api.py
|
command: uv run thirdparty/train_api.py
|
||||||
networks:
|
networks:
|
||||||
- temporal-network
|
- temporal-network
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ Run the following commands in separate terminal windows:
|
|||||||
|
|
||||||
1. Start the Temporal worker:
|
1. Start the Temporal worker:
|
||||||
```bash
|
```bash
|
||||||
uv run python scripts/run_worker.py
|
uv run scripts/run_worker.py
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Start the API server:
|
2. Start the API server:
|
||||||
@@ -257,7 +257,7 @@ NOTE: This goal was developed for an on-stage demo and has failure (and its reso
|
|||||||
|
|
||||||
Required to search and book trains!
|
Required to search and book trains!
|
||||||
```bash
|
```bash
|
||||||
uv run python thirdparty/train_api.py
|
uv run thirdparty/train_api.py
|
||||||
|
|
||||||
# example url
|
# example url
|
||||||
# http://localhost:8080/api/search?from=london&to=liverpool&outbound_time=2025-04-18T09:00:00&inbound_time=2025-04-20T09:00:00
|
# http://localhost:8080/api/search?from=london&to=liverpool&outbound_time=2025-04-18T09:00:00&inbound_time=2025-04-20T09:00:00
|
||||||
@@ -269,7 +269,7 @@ uv run python thirdparty/train_api.py
|
|||||||
These are Python activities that fail (raise NotImplemented) to show how Temporal handles a failure. You can run these activities with.
|
These are Python activities that fail (raise NotImplemented) to show how Temporal handles a failure. You can run these activities with.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
uv run python scripts/run_legacy_worker.py
|
uv run scripts/run_legacy_worker.py
|
||||||
```
|
```
|
||||||
|
|
||||||
The activity will fail and be retried infinitely. To rescue the activity (and its corresponding workflows), kill the worker and run the .NET one in the section below.
|
The activity will fail and be retried infinitely. To rescue the activity (and its corresponding workflows), kill the worker and run the .NET one in the section below.
|
||||||
@@ -324,7 +324,7 @@ For more details, check out [adding goals and tools guide](./adding-goals-and-to
|
|||||||
[ ] Select an LLM and add your API key to `.env` <br />
|
[ ] Select an LLM and add your API key to `.env` <br />
|
||||||
[ ] (Optional) set your starting goal and goal category in `.env` <br />
|
[ ] (Optional) set your starting goal and goal category in `.env` <br />
|
||||||
[ ] (Optional) configure your Temporal Cloud settings in `.env` <br />
|
[ ] (Optional) configure your Temporal Cloud settings in `.env` <br />
|
||||||
[ ] `uv run python scripts/run_worker.py` <br />
|
[ ] `uv run scripts/run_worker.py` <br />
|
||||||
[ ] `uv run uvicorn api.main:app --reload` <br />
|
[ ] `uv run uvicorn api.main:app --reload` <br />
|
||||||
[ ] `cd frontend`, `npm install`, `npx vite` <br />
|
[ ] `cd frontend`, `npm install`, `npx vite` <br />
|
||||||
[ ] Access the UI at `http://localhost:5173` <br />
|
[ ] Access the UI at `http://localhost:5173` <br />
|
||||||
|
|||||||
Reference in New Issue
Block a user