Skip to content

Commit

Permalink
chore: updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovik committed Sep 6, 2024
1 parent dee6085 commit 908c4e7
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,44 @@ Copy `.env.example` to `.env` and customize it for your environment:

### Running interceptor as a DIAL service

To run dev application locally run:
#### From package

To run the server with examples using pip:

```sh
make examples_serve
pip install uvicorn python-dotenv "aidial-interceptors-sdk[examples]"
echo "DIAL_URL=URL" > .env
uvicorn "aidial_interceptors_sdk.examples.app:app" --host "0.0.0.0" --port 5000 --env-file ./.env
```

To run from Docker container:
Don't forget to set the appropriate `DIAL_URL` in the `.env` file.

The command will start the server on `http://localhost:5000` exposing endpoints for each of the interceptors like the following:

- `http://localhost:5000/openai/deployments/pii-anonymizer/chat/completions`
- `http://localhost:5000/openai/deployments/normalize-vector/embeddings`

#### From sources

First clone the repository:

```sh
make examples_docker_serve
git clone https://github.com/epam/ai-dial-interceptors-sdk.git .
cd ai-dial-interceptors-sdk
echo "DIAL_URL=URL" > .env
```

Either of the commands will start the server on `http://localhost:5000` exposing endpoints for each of the interceptors like these:
Then run dev server with examples:

- `http://localhost:5000/openai/deployments/pii-anonymizer/chat/completions`
- `http://localhost:5000/openai/deployments/normalize-vector/embeddings`
```sh
make examples_serve
```

Or run the server from Docker container:

```sh
make examples_docker_serve
```

### DIAL Core configuration

Expand Down

0 comments on commit 908c4e7

Please sign in to comment.