Skip to content

LLMClient is a simple Python library for interacting with Large Language Models (LLMs).

License

Notifications You must be signed in to change notification settings

utak3r/LLMClient

Repository files navigation

LLMClient

LLMClient is a simple Python library for interacting with Large Language Models (LLMs). It is tailored to my own needs, but if you find it useful, you can use it too.

For now, it supports two types of LLMs:

Both support setting a desired model, temperature and eventually a JSON format of the output. You can also use a specific system prompt (see llm_client_test_json.py for an example).

Usage

See the examples in the llm_client_test_*.py files. The most simple example is:

from llm_client.LLMClientOllama import LLMClientOllama

llm_client_ollama = LLMClientOllama()
llm_client_ollama.set_model("gemma3:12b")
llm_client_ollama.set_temperature(1)

response, llm_role = llm_client_ollama.call_llm("What is the meaning of life and everything?")
print(f"Response from {llm_role}: {response}")

Dependencies

This project uses the following dependencies:

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

LLMClient is a simple Python library for interacting with Large Language Models (LLMs).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages