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.9.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.9-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file kynex-0.1.9.tar.gz.

File metadata

  • Download URL: kynex-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 5f8582df6b501b7a53e1e513fea4391b7b24ea246988814b03eb8065c0dfdaed
MD5 8ff19d64c0c5dacc04f9abe62ac34a78
BLAKE2b-256 e0c2d96427a4d44cb2da7492948fcf088eadef825213d89beaa8f3baf9bffb31

See more details on using hashes here.

File details

Details for the file kynex-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: kynex-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 b7f34e5f33a975384b4af08f0bb28ac4c159fad8519e3c2ce57b5b97bf8f2d2d
MD5 81a74cc7adb2d859f8e199eae8b5e71d
BLAKE2b-256 25aa961a47e92599b42eeee9be0cc55af945c62849c8a15f33a970b2aaeb5969

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