From d4eb3af67e3ed6d97aedad82549df045e363ae1c Mon Sep 17 00:00:00 2001 From: 0x7oid Date: Thu, 25 Jun 2026 20:37:34 +0100 Subject: [PATCH] sat up llm client (default is gemini 3.5 flash) --- .gitignore | 5 ++++- src/llm/llm_client.py | 12 ++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 src/llm/llm_client.py diff --git a/.gitignore b/.gitignore index a96d882..8bc84a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ git_guide.md .env -__pycache__/ \ No newline at end of file +__pycache__/ +.mypy_cache/ +.ruff_cache/ +.pytest_cache/ \ No newline at end of file diff --git a/src/llm/llm_client.py b/src/llm/llm_client.py new file mode 100644 index 0000000..fa06b50 --- /dev/null +++ b/src/llm/llm_client.py @@ -0,0 +1,12 @@ +from google import genai +import os + +client = genai.client(api_key=os.environ.get("API_KEY")) + + +def ask_llm(prompt , model="gemini-3.5-flash"): + response = client.models.generate_content( + model=model , contents = prompt + ) + return response.text +