- 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)
31 lines
768 B
Python
31 lines
768 B
Python
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',
|
|
}
|
|
|
|
|