Spaces:
Sleeping
Sleeping
| from assistants import create_assistants | |
| from models import ModelFactory | |
| class CoreSystem: | |
| def __init__(self): | |
| self.ai_model = ModelFactory.create_model( | |
| "sambanova", | |
| api_key=os.getenv("SAMBANOVA_API_KEY") | |
| ) | |
| self.assistants = create_assistants(self.ai_model) | |
| def generate_with_assistant(self, assistant_key: str, subject: str) -> str: | |
| assistant = self.assistants.get(assistant_key) | |
| if not assistant: | |
| raise ValueError("Assistant not found") | |
| return assistant.generate_prompt(subject) |