Skip to main content

A client package to directly integrate Bud Serve engine to your python application.

Project description

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:

  • 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"])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

budserve-0.0.1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

budserve-0.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file budserve-0.0.1.tar.gz.

File metadata

  • Download URL: budserve-0.0.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for budserve-0.0.1.tar.gz
Algorithm Hash digest
SHA256 13c0e47eced427909b8e0728d68d6a164471bcc9fdfdc88d9edcec76eb305d94
MD5 450d3e76c0b82c467097358de18ee472
BLAKE2b-256 f7f685d4fa08a62f0160f562a949c0808413b18c6fe52d0d01f2e779fbd6d42f

See more details on using hashes here.

File details

Details for the file budserve-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: budserve-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.5

File hashes

Hashes for budserve-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 786022cea2a7ed631b37a365ce72a3c48c9c1b62569c969f9b3dc7f2b8b27ed5
MD5 24a955485e48d61f6acaabfb6e2a551a
BLAKE2b-256 d329562d6c3d931585b4cd8d2ad93668b1c750af8848477c91a892a859b9add0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page