mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-06-17 23:09:35 +00:00
Complete AI-powered personal brand automation for Sami Assiri.\n\n7 agents: LinkedIn, Email, Social Media, WhatsApp, CV Optimizer, Content Strategist, Opportunity Scout.\nInfra: FastAPI + APScheduler + Docker + Ollama/Groq LLM + GitHub Pages landing page.\n83 files, ~10K lines. Cost: $0-5/month.
35 lines
1.0 KiB
Python
35 lines
1.0 KiB
Python
"""Tests for LLM client."""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
|
|
|
|
def test_llm_client_init():
|
|
"""LLM client should initialize with defaults."""
|
|
from llm.client import LLMClient
|
|
client = LLMClient()
|
|
assert client.ollama_model == "qwen2.5:7b"
|
|
assert client.groq_model == "llama-3.1-70b-versatile"
|
|
assert client.openai_model == "gpt-4o-mini"
|
|
|
|
|
|
def test_llm_response_dataclass():
|
|
"""LLMResponse should hold data correctly."""
|
|
from llm.client import LLMResponse
|
|
resp = LLMResponse(text="Hello", model="test", provider="ollama", tokens_used=10)
|
|
assert resp.text == "Hello"
|
|
assert resp.provider == "ollama"
|
|
assert resp.tokens_used == 10
|
|
|
|
|
|
def test_rate_limiter():
|
|
"""Rate limiter should track and enforce limits."""
|
|
from utils.rate_limiter import RateLimiter
|
|
rl = RateLimiter()
|
|
# LinkedIn default is 50/day
|
|
assert rl.remaining("linkedin") == 50
|
|
assert rl.allow("linkedin") is True
|
|
assert rl.remaining("linkedin") == 49
|