Spaces:
Runtime error
Runtime error
import os | |
import ollama | |
from typing import List, Dict | |
def cosine_similarity(embedding_0, embedding_1): | |
pass | |
def generate_embedding(model, text: str, model_type: str) -> List[float]: | |
pass | |
def search_with_llm(query: str, model: str = "llama3.2"): | |
try: | |
response = ollama.chat( | |
model=model, | |
messages=[{"role": "user", "content": query}] | |
) | |
return response["message"]["content"] | |
except Exception as e: | |
return f"❌ Error processing request: {str(e)}" | |