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.1.tar.gz (2.7 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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for QuantileClient-0.1.tar.gz
Algorithm Hash digest
SHA256 0f38c4fcc9fe5110915744945e11521dc74e6c378d5ddaef179df68f4ea05cb1
MD5 28016d2aa1f6426a23eb95ba569a1fd4
BLAKE2b-256 b55189e21ea05d5dc69ba18b50b651ded5e54ee41210ff0dd91b4da3fc1c8187

See more details on using hashes here.

File details

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

File metadata

  • Download URL: QuantileClient-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 39b58d3afa89fdd98f509f26f6c5da7e6c260721c0ba7ad41447fea277ae13e3
MD5 a31e392035ad6b5540b56ef1954f8b93
BLAKE2b-256 fa4d0e26cb51ec8661b224f114b73c06e37645507bb004988e4a54c9d56ca409

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