Files
eveAI/eveai_chat_workers/outputs/spin/spin_v1_0.py
Josako 25213f2004 - Implementation of specialist execution api, including SSE protocol
- eveai_chat becomes deprecated and should be replaced with SSE
- Adaptation of STANDARD_RAG specialist
- Base class definition allowing to realise specialists with crewai framework
- Implementation of SPIN_SPECIALIST
- Implementation of test app for testing specialists (test_specialist_client). Also serves as an example for future SSE-based client
- Improvements to startup scripts to better handle and scale multiple connections
- Small improvements to the interaction forms and views
- Caching implementation improved and augmented with additional caches
2025-02-20 05:50:16 +01:00

25 lines
1.2 KiB
Python

from typing import List, Optional
from pydantic import BaseModel, Field
class SPINOutput(BaseModel):
situation: Optional[str] = Field(None, description="Situation information")
problem: Optional[str] = Field(None, description="Problem information")
implication: Optional[str] = Field(None, description="Implication information")
need: Optional[str] = Field(None, description="Need-payoff information")
additional_info: Optional[str] = Field(None, description="Additional sales-related information.")
questions: Optional[str] = Field(None, description="Additional questions to further clarify SPIN")
potential_customer: Optional[bool] = Field(False, description="Indication if this could be a good customer")
def __str__(self):
"""Custom string output for usage in agents and tasks"""
return (f"Situation: {self.situation or 'N/A'}\n"
f"Problem: {self.problem or 'N/A'}\n"
f"Implication: {self.implication or 'N/A'}\n"
f"Need: {self.need or 'N/A'}\n"
f"Additional Info: {self.additional_info or 'N/A'}\n"
f"Questions: {self.questions or 'N/A'}\n"
f"Potential Customer: {self.potential_customer or 'N/A'}\n")