Add Ability to Summarize Documents (#800)

* Uses entire file text and summarizer model to generate document summary.
* Uses the contents of the user's query to create a tailored summary.
* Integrates with File Filters #788 for a better UX.
This commit is contained in:
Raghav Tirumale
2024-06-18 10:01:07 -04:00
committed by GitHub
parent 677d49d438
commit d4e5c95711
21 changed files with 791 additions and 85 deletions

View File

@@ -51,7 +51,9 @@ class ChatModelOptionsFactory(factory.django.DjangoModelFactory):
tokenizer = None
chat_model = "NousResearch/Hermes-2-Pro-Mistral-7B-GGUF"
model_type = "offline"
openai_config = factory.SubFactory(OpenAIProcessorConversationConfigFactory)
openai_config = factory.LazyAttribute(
lambda obj: OpenAIProcessorConversationConfigFactory() if os.getenv("OPENAI_API_KEY") else None
)
class UserConversationProcessorConfigFactory(factory.django.DjangoModelFactory):