Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dittops committed Jul 5, 2024
1 parent aecb86e commit 62c15fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ A client package to directly integrate Bud Serve engine to your python applicati

### Installation

```
```bash
pip install git+https://github.com/BudEcosystem/bud-serve-sdk.git
```

### Usage

The inference engine can be accessed via OpenAI api format and the options available in the OpenAI chat and completion can be used from our client.

```
```python
from budserve import BudServe

client = BudServe(base_url="http://x.x.x.x:xxx/v1")
Expand All @@ -25,14 +25,14 @@ completion = client.chat.completions.create(

print(completion.choices[0].message.content)
```
You will need add the api key, BUDSERVE_API_KEY=XXXXXXXX in your env to authenticate.
You will need add the api key, `BUDSERVE_API_KEY=XXXXXXXX` in your env to authenticate.


### Streaming responses:

The streaming response support is provided using Server Side Events.

```
```python
from budserve import BudServe

client = BudServe(base_url="http://x.x.x.x:xxx/v1")
Expand Down Expand Up @@ -62,12 +62,12 @@ for chunk in stream:

Add the API key to the enviornament

```
```bash
export BUDSERVE_API_KEY=XXXXXXXX
```
Sample code to connect to bud serve remote server using guidance

```
```python
from guidance import gen, user, system, assistant
from budserve.models.guidance import BudServeClient

Expand Down

0 comments on commit 62c15fc

Please sign in to comment.