Skip to main content

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 PromptTemplate for 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


Download files

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

Source Distribution

kynex-0.1.7.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

kynex-0.1.7-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for kynex-0.1.7.tar.gz
Algorithm Hash digest
SHA256 52d835f454438dc7423db4ee6d7b7ba121009f0fd194d28aa8951ae36c040a86
MD5 6ac441cb8f57aae7229edacb567ff3bb
BLAKE2b-256 dcc2ce4841e13096a9deb2a18110c4bbcd08df8424052771d3a61d778eeba5ca

See more details on using hashes here.

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

Hashes for kynex-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a549a9e8f6740ae4efd00173215a7088e76f006d14e9235069319c887f6ed5f8
MD5 30e2b0a865b65be6211d7331b9a868a9
BLAKE2b-256 315b967837f6600c25426dce5062d6dd246a0353aa7c04aeddc9473cbee54a51

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