Metadata-Version: 2.1
Name: budserve
Version: 0.0.1
Summary: A client package to directly integrate Bud Serve engine to your python application.
Home-page: https://github.com/BudEcosystem/bud-serve-sdk
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: guidance==0.1.15
Requires-Dist: transformers

# Bud Serve Python SDK

A client package to directly integrate Bud Serve engine to your python application. The package support different prompting libraries like Guidance, langchain etc.

### Installation

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

### Supported integrations:

- [X] Guidance
- [ ] LangChain
- [ ] LlamaIndex
- [ ] Haystack
- [ ] LMQL

### Guidance example

Add the API key to the enviornament

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

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

llama2 = BudServeClient("meta-llama/Llama-2-7b-chat-hf", echo=False, base_url="http://localhost9000/v1")

with user():
    llama2 += f'what is your name? '

with assistant():
    llama2 += gen("answer", stop='.')


print(llama2["answer"])

```
