From aff224aca71bbfe008d2303890b3f66061918673 Mon Sep 17 00:00:00 2001 From: Dicklesworthstone Date: Sat, 18 May 2024 23:51:13 -0400 Subject: [PATCH] Small tweak --- service_functions.py | 2 +- swiss_army_llama.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/service_functions.py b/service_functions.py index 0bde158..96b2531 100644 --- a/service_functions.py +++ b/service_functions.py @@ -678,7 +678,7 @@ def validate_bnf_grammar_func(grammar): return False, f"Used rule {rule} is not defined." return True, "Valid BNF Grammar" -def convert_document_to_sentences(file_path: str, mime_type: str) -> Dict[str, Any]: +def convert_document_to_sentences_func(file_path: str, mime_type: str) -> Dict[str, Any]: # Extract text from document if mime_type.startswith('text/'): with open(file_path, 'r') as buffer: diff --git a/swiss_army_llama.py b/swiss_army_llama.py index 7cae42c..df00f8e 100644 --- a/swiss_army_llama.py +++ b/swiss_army_llama.py @@ -9,7 +9,7 @@ from embeddings_data_models import EmbeddingResponse, SemanticSearchResponse, AdvancedSemanticSearchResponse, SimilarityResponse, AllStringsResponse, AllDocumentsResponse, TextCompletionResponse, AddGrammarResponse from embeddings_data_models import ShowLogsIncrementalModel from service_functions import get_or_compute_embedding, get_or_compute_transcript, add_model_url, get_or_compute_token_level_embedding_bundle_combined_feature_vector, calculate_token_level_embeddings -from service_functions import parse_submitted_document_file_into_sentence_strings_func, compute_embeddings_for_document, store_document_embeddings_in_db, generate_completion_from_llm, validate_bnf_grammar_func, convert_document_to_sentences +from service_functions import parse_submitted_document_file_into_sentence_strings_func, compute_embeddings_for_document, store_document_embeddings_in_db, generate_completion_from_llm, validate_bnf_grammar_func, convert_document_to_sentences_func from grammar_builder import GrammarBuilder from log_viewer_functions import show_logs_incremental_func, show_logs_func from uvicorn_config import option