Merge branch 'device' into dev
This commit is contained in:
commit
3a22df736e
39 files changed
+6554
-6
No files matched your search
@@ -1356,6 +1356,7 @@ def chat_completions():
|
||||
leave_feature_enabled = _can_use_leave_feature(agent_proxy)
|
||||
|
||||
from app.services.faq_cache import FaqCacheService
|
||||
from app.services.maintenance_chat_service import MaintenanceChatService
|
||||
faq_hit = FaqCacheService.try_match(query, agent_id) if not normalized_files else None
|
||||
|
||||
if faq_hit:
|
||||
@@ -1367,6 +1368,14 @@ def chat_completions():
|
||||
external_conversation_id,
|
||||
session_id=session.session_id,
|
||||
)
|
||||
elif not normalized_files and MaintenanceChatService.supports(query, agent_proxy):
|
||||
generator = MaintenanceChatService.stream_chat(
|
||||
query,
|
||||
user_proxy,
|
||||
agent_proxy,
|
||||
external_conversation_id,
|
||||
session_id=session.session_id,
|
||||
)
|
||||
elif PLMOracleService.supports(query, agent_proxy):
|
||||
generator = PLMOracleService.stream_chat(query, user_proxy, agent_proxy, external_conversation_id, session_id=session.session_id)
|
||||
elif leave_supported and leave_feature_enabled:
|
||||
|
||||
Reference in new issue
Block a user