Spaces:
Sleeping
Sleeping
Delate core_logic.py
Browse files- core_logic.py +0 -16
core_logic.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
from assistants import create_assistants
|
| 2 |
-
from models import ModelFactory
|
| 3 |
-
|
| 4 |
-
class CoreSystem:
|
| 5 |
-
def __init__(self):
|
| 6 |
-
self.ai_model = ModelFactory.create_model(
|
| 7 |
-
"sambanova",
|
| 8 |
-
api_key=os.getenv("SAMBANOVA_API_KEY")
|
| 9 |
-
)
|
| 10 |
-
self.assistants = create_assistants(self.ai_model)
|
| 11 |
-
|
| 12 |
-
def generate_with_assistant(self, assistant_key: str, subject: str) -> str:
|
| 13 |
-
assistant = self.assistants.get(assistant_key)
|
| 14 |
-
if not assistant:
|
| 15 |
-
raise ValueError("Assistant not found")
|
| 16 |
-
return assistant.generate_prompt(subject)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|