| 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() | |