Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Dicklesworthstone committed May 21, 2024
1 parent 69bbdd7 commit c084065
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions swiss_army_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,10 @@ async def get_all_embedding_vectors_for_document(
context = start_resource_monitoring("get_all_embedding_vectors_for_document", input_data, client_ip)
try:
results = await compute_embeddings_for_document(sentences, llm_model_name, client_ip, file_hash)
except Exception as e:
logger.error(f"Error while computing embeddings for document: {e}")
traceback.print_exc()
raise HTTPException(status_code=400, detail="Error while computing embeddings for document")
finally:
end_resource_monitoring(context)
df = pd.DataFrame(results, columns=['text', 'embedding'])
Expand Down

0 comments on commit c084065

Please sign in to comment.