- Move global config files to globals iso global folder, as the name global conflicts with python language
- Creation of Traicie Vancancy Definition specialist - Allow to invoke non-interaction specialists from withing Evie's mgmt interface (eveai_app) - Improvements to crewai specialized classes - Introduction to json editor for showing specialists arguments and results in a better way - Introduction of more complex pagination (adding extra arguments) by adding a global 'get_pagination_html' - Allow follow-up of ChatSession / Specialist execution - Improvement in logging of Specialists (but needs to be finished)
This commit is contained in:
30
common/services/interaction/specialist_services.py
Normal file
30
common/services/interaction/specialist_services.py
Normal file
@@ -0,0 +1,30 @@
|
||||
import uuid
|
||||
from typing import Dict, Any, Tuple
|
||||
|
||||
from common.utils.celery_utils import current_celery
|
||||
|
||||
|
||||
class SpecialistServices:
|
||||
@staticmethod
|
||||
def start_session() -> str:
|
||||
return f"CHAT_SESSION_{uuid.uuid4()}"
|
||||
|
||||
@staticmethod
|
||||
def execute_specialist(tenant_id, specialist_id, specialist_arguments, session_id, user_timezone) -> Dict[str, Any]:
|
||||
task = current_celery.send_task(
|
||||
'execute_specialist',
|
||||
args=[tenant_id,
|
||||
specialist_id,
|
||||
specialist_arguments,
|
||||
session_id,
|
||||
user_timezone,
|
||||
],
|
||||
queue='llm_interactions'
|
||||
)
|
||||
|
||||
return {
|
||||
'task_id': task.id,
|
||||
'status': 'queued',
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user