File size: 334 Bytes
01812ff | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import hashlib
from config import client
def call_model(prompt: str, model="llama-3.1-8b-instant") -> str:
response = client.responses.create(
model=model,
input=prompt
)
return response.output_text.strip()
def get_hash(text: str) -> str:
return hashlib.sha256(text.encode()).hexdigest()
|