- Move to Mistral iso OpenAI as primary choice
This commit is contained in:
@@ -17,7 +17,8 @@ from common.models.document import DocumentVersion, Embedding, Document, Process
|
||||
from common.models.user import Tenant
|
||||
from common.utils.celery_utils import current_celery
|
||||
from common.utils.database import Database
|
||||
from common.utils.model_utils import create_language_template, get_model_variables, get_embedding_model_and_class
|
||||
from common.utils.model_utils import create_language_template, get_model_variables, get_embedding_model_and_class, \
|
||||
get_embedding_llm
|
||||
|
||||
from common.utils.business_event import BusinessEvent
|
||||
from common.utils.business_event_context import current_event
|
||||
@@ -209,7 +210,7 @@ def enrich_chunks(tenant, model_variables, document_version, title, chunks):
|
||||
|
||||
def summarize_chunk(tenant, model_variables, document_version, chunk):
|
||||
current_event.log("Starting Summarizing Chunk")
|
||||
llm = model_variables.get_llm()
|
||||
llm = get_embedding_llm()
|
||||
template = model_variables.get_template("summary")
|
||||
language_template = create_language_template(template, document_version.language)
|
||||
summary_prompt = ChatPromptTemplate.from_template(language_template)
|
||||
|
||||
Reference in New Issue
Block a user