A Python package to get data from different llm's
Project description
🔷 Kynex
Kynex is a modular Python framework that simplifies connecting to multiple LLM providers such as Google Gemini and Groq via a unified, flexible interface. Whether you're building AI workflows, chatbots, or prompt-based applications, Kynex makes it seamless to integrate LLMs dynamically based on user input.
🚀 Features
- Multi-LLM support**: Easily switch between different LLMs
- API key flexibility**: Dynamically accept LLM type, model name, and API key at runtime
- LangChain prompt integration**: Use
PromptTemplatefor advanced prompt formatting - Simple base architecture**: Extend to any new LLM provider with a custom class
📦 Installation
pip install kynex
Example Usage:
Create it:
Create a Python file and add the following:
from kynex.kynexa import Kynex
request = {
"prompt": "your_prompt.",
"model_name": "your_model_name",
"api_key": "your_api_key",
"llm_type": "type_llm" # e.g: "gemini"
}
response = Kynex.get_llm_response(
prompt=request["prompt"],
model_name=request["model_name"],
api_key=request["api_key"],
llm_type=request.get("llm_type")
)
print(response)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kynex-0.1.7.tar.gz.
File metadata
- Download URL: kynex-0.1.7.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52d835f454438dc7423db4ee6d7b7ba121009f0fd194d28aa8951ae36c040a86
|
|
| MD5 |
6ac441cb8f57aae7229edacb567ff3bb
|
|
| BLAKE2b-256 |
dcc2ce4841e13096a9deb2a18110c4bbcd08df8424052771d3a61d778eeba5ca
|
File details
Details for the file kynex-0.1.7-py3-none-any.whl.
File metadata
- Download URL: kynex-0.1.7-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a549a9e8f6740ae4efd00173215a7088e76f006d14e9235069319c887f6ed5f8
|
|
| MD5 |
30e2b0a865b65be6211d7331b9a868a9
|
|
| BLAKE2b-256 |
315b967837f6600c25426dce5062d6dd246a0353aa7c04aeddc9473cbee54a51
|