This python package help to interact with Generative AI - Large Language Models. It interacts with AIaaS LLM , AIaaS embedding , AIaaS Audio set of APIs to cater the request.
Project description
AIaaS Falcon
Description
A Python client to interact with a specific API, allowing operations such as listing models, creating embeddings, and generating text based on certain configurations.
Installation
Ensure you have the requests
and google-api-core
libraries installed:
pip install requests
pip install google-api-core
Usage
-
Initialization:
from falcon_client import Falcon # Assuming the class is saved in a file named falcon_client.py falcon_client = Falcon(api_key="<Your_API_Key>", host_name_port="<Your_Host_Name_Port>")
-
Listing Models:
models = falcon_client.list_models() print(models)
-
Creating an Embedding:
response = falcon_client.create_embedding(file_path="<Your_File_Path>") print(response)
-
Generating Text:
response = falcon_client.generate_text(chat_history=[], query="<Your_Query>") print(response)
Methods
list_models(self)
- Retrieves available models.create_embedding(self, file_path)
- Creates embeddings from a provided file.generate_text(self, chat_history=[], query="", use_default=1, conversation_config={}, config={})
- Generates text based on provided parameters.
Conclusion
The Falcon API Client simplifies interactions with the specified API, providing a straightforward way to perform various operations such as listing models, creating embeddings, and generating text.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aiaas_falcon-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e2402ce28508f9bca72ff6b09f45a231f553dd388383d26cbf987e1efbd2217 |
|
MD5 | 4842f468cf99ddc741a19f9bd32ccb8e |
|
BLAKE2b-256 | 3b80e58cb35e3acf489d24f47f051e7897373ec744c2b1675ca47383a54a7ada |