Skip to main content

Its a wrapper lib from quantile ai api service

Project description

QuantileClientLib

QuantileClient is a Python client library designed to serve as a wrapper for the Quantile AI API. It simplifies the process of interacting with Quantile's LLM models, enabling developers to seamlessly integrate Quantile's capabilities into their Python applications.

pip install QuantileClient
from QuantileClient import QuantileClient

base_url = "http://<api url>"  # Adjust to your server's base URL
api_key = "<your-api-quant-api-key>"

client = QuantileClient(base_url, api_key)
prompt = "what is an api"

# use any platform and model just change the func
openai_response = client.generate_openai_response(
        model="gpt-3.5-turbo-0125",
        messages=[{"role": "system", "content": prompt},
                  ],
        max_tokens=100
    )

cohere_respose = client.generate_cohere_response(
        max_tokens=100,
        message = prompt , 
        chat_history=[
            {"role": "CHATBOT", "message": "you are an api expert"}
            ]
        connectors=[{"id": "web-search"}]
    )


print(f"My openai response is {openai_response}")
print(f"My cohere response is {cohere_response}")

Acess call cascading api

from QuantileClient import QuantileClient

base_url = "http://<api url>"  # Adjust to your server's base URL
api_key = "<your-api-quant-api-key>"

client = QuantileClient(base_url, api_key)
prompt = "what is an api"

# No neeed to specify model 

callcascade = client.call_cascading(
    prompt="tell me the word news and something abt apis",
    max_tokens=100
    
)

Contributing

Contributions are welcome! Feel free to open issues, submit pull requests, or provide feedback.

License

MIT

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

QuantileClient-0.2.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

QuantileClient-0.2-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file QuantileClient-0.2.tar.gz.

File metadata

  • Download URL: QuantileClient-0.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for QuantileClient-0.2.tar.gz
Algorithm Hash digest
SHA256 cf5ed959bc5ae9654abd65d297e414e5d55c1ecd5ff61a6d17cd32fa55c53652
MD5 fcf217a775f2f3cf1c6fa04878b5c37b
BLAKE2b-256 82b6b454c798ad0e1ad1f227332b951575c56e40af41280a6096a20a959e8fd4

See more details on using hashes here.

File details

Details for the file QuantileClient-0.2-py3-none-any.whl.

File metadata

  • Download URL: QuantileClient-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for QuantileClient-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96b1deb21b77fa45122b7ec5851032571f044966efcd6bf7513cd52422b7db54
MD5 4b00b661c9be9486dcf57426d8675e0c
BLAKE2b-256 2be65f1ba7af602768c3172880412bea7b20a559c9b1b82a7173659d8e10b3b2

See more details on using hashes here.

Supported by

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