Skip to main content

Wrapper library for using **DeepSeek** with **openrouter.ai**

Project description

Project generated with PyScaffold

|

openrouter-manager

openrouter-manager is a wrapper library for using DeepSeek with openrouter.ai, facilitating integration with language models through a simple and efficient API.

Main Features

  • Wrapper for DeepSeek using openrouter.ai.

  • Easy-to-use singleton class AiAgent.

  • Allows defining dynamic prompts with variables.

  • Configuration via environment variables.

Installation

It is recommended to install openrouter-manager in a virtual environment to avoid dependency conflicts:

pip install openrouter-manager

Requirements

To use this library, the following environment variables must be set:

  • AIAGENT_API_KEY: API Key for openrouter.ai.

  • AIAGENT_PROMPT_FILE: Path to the text file containing the prompt to send to the LLM.

Example configuration in a .env file:

AIAGENT_API_KEY="your_api_key_here"
AIAGENT_PROMPT_FILE="path/to/prompt_file.txt"

Usage

To use openrouter-manager, first instantiate AiAgent and then call the resolve method, providing the necessary variables to populate the prompt:

from openrouter_manager import AiAgent

# Get the singleton instance of the agent
agent = AiAgent()

# Resolve the prompt with dynamic variables
response = agent.resolve({"name": "John", "age": 30})

print(response)  # Response generated by the LLM

Contributing

If you would like to contribute to this project, you can clone the repository and make modifications:

git clone https://github.com/your_username/openrouter-manager.git
cd openrouter-manager

Contributions are welcome. Make sure to follow best coding practices and document your changes.

License

This project is open-source, owned by Koral Advanced Technology, and developed by Lenin David Lozano. It is freely available for use and modification under the MIT License. See the LICENSE file for more details. .. pyscaffold-notes:

Note

This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.

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

openrouter_manager-0.0.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

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

openrouter_manager-0.0.1-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file openrouter_manager-0.0.1.tar.gz.

File metadata

  • Download URL: openrouter_manager-0.0.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for openrouter_manager-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e621cd62781291de639cc4d13a22e0f969beae0f14f6b6c74a549fe3f780d6d6
MD5 dbb69f10bc5296c72c5f8460bf287419
BLAKE2b-256 0481895403bc1a3f041be9997f9b90c35250c704ab9bd814c852f72545cf6b26

See more details on using hashes here.

File details

Details for the file openrouter_manager-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for openrouter_manager-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 136c64c7a4f7791ad7849e4a850c792029e5a38c7e660efc38b6130f71b23b79
MD5 9bfa4526982f51502fca02684d409b16
BLAKE2b-256 a4f769eea0b95c94e1a8c68ad321bbc2ef1bac144f82140b9e550c87bc725e85

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