Skip to content

Commit

Permalink
README.md: add step for configuration from GenTradeAgent
Browse files Browse the repository at this point in the history
Signed-off-by: Lu Ken <[email protected]>
  • Loading branch information
kenplusplus committed Dec 31, 2024
1 parent db7e8e5 commit 1f685a5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ OPENAI_API_MODEL="gpt-3.5-turbo"

BINANCE_API_KEY=
BINANCE_API_SECRET=
GENTRADE_CACHE_DIR="/app/cache/"
GENTRADE_CACHE_DIR=/app/cache/

http_proxy=
https_proxy=
no_proxy=127.0.0.1,localhost
HTTP_PROXY=
HTTPS_PROXY=
NO_PROXY=127.0.0.1,localhost
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

```shell
export PYTHONPATH=<repo_dir>/src
uvicorn gentrade-server.main:app --reload
uvicorn gentrade-server.main:app --reload --host 0.0.0.0 --port 8000
or
python -m gentrade-server.main
```
Expand All @@ -18,4 +18,34 @@ python -m gentrade-server.main

```shell
docker run -p 8000:8000 registry.cn-hangzhou.aliyuncs.com/kenplusplus/gentrade_server
```
```

After starting the server, please test restful API via <http://127.0.0.1:8000/docs>

## Setup Environment Variable

It dependends on following environment variable, please use `export` or create a

Check warning on line 27 in README.md

View workflow job for this annotation

GitHub Actions / scan_doc

Unknown word (dependends)
new `.env` file from [.env.template](./.env.template), and pass it into docker
via `--env-file`

```
OPENAI_API_KEY=

Check warning on line 32 in README.md

View workflow job for this annotation

GitHub Actions / scan_doc

Unknown word (OPENAI)
OPENAI_API_URL=

Check warning on line 33 in README.md

View workflow job for this annotation

GitHub Actions / scan_doc

Unknown word (OPENAI)
OPENAI_API_MODEL="gpt-3.5-turbo"

Check warning on line 34 in README.md

View workflow job for this annotation

GitHub Actions / scan_doc

Unknown word (OPENAI)
BINANCE_API_KEY=
BINANCE_API_SECRET=
GENTRADE_CACHE_DIR=/app/cache/
HTTP_PROXY=
HTTPS_PROXY=
NO_PROXY=127.0.0.1,localhost
```

## Configure from GenTradeAgent client

After server is established, please correct it in GenTradeAgent for new address
URL.
![](docs/gentrade-agent-configure.png)

You can also get server's latency and connection status.
Binary file added docs/gentrade-agent-configure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1f685a5

Please sign in to comment.