mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-08-01 17:37:43 +00:00
53 lines
1.6 KiB
Python
53 lines
1.6 KiB
Python
from copy import deepcopy
|
|
from pathlib import Path
|
|
|
|
from rdagent.core.prompts import Prompts
|
|
from rdagent.core.scenario import Scenario
|
|
|
|
prompt_dict = Prompts(file_path=Path(__file__).parent / "prompts.yaml")
|
|
|
|
|
|
class GeneralModelScenario(Scenario):
|
|
def __init__(self) -> None:
|
|
super().__init__()
|
|
self._background = deepcopy(prompt_dict["general_model_background"])
|
|
self._output_format = deepcopy(prompt_dict["general_model_output_format"])
|
|
self._interface = deepcopy(prompt_dict["general_model_interface"])
|
|
self._simulator = deepcopy(prompt_dict["general_model_simulator"])
|
|
self._rich_style_description = deepcopy(prompt_dict["general_model_rich_style_description"])
|
|
|
|
@property
|
|
def background(self) -> str:
|
|
return self._background
|
|
|
|
@property
|
|
def source_data(self) -> str:
|
|
raise NotImplementedError("source_data of GeneralModelScenario is not implemented")
|
|
|
|
@property
|
|
def output_format(self) -> str:
|
|
return self._output_format
|
|
|
|
@property
|
|
def interface(self) -> str:
|
|
return self._interface
|
|
|
|
@property
|
|
def simulator(self) -> str:
|
|
return self._simulator
|
|
|
|
@property
|
|
def rich_style_description(self) -> str:
|
|
return self._rich_style_description
|
|
|
|
def get_scenario_all_desc(self) -> str:
|
|
return f"""Background of the scenario:
|
|
{self.background}
|
|
The interface you should follow to write the runnable code:
|
|
{self.interface}
|
|
The output of your code should be in the format:
|
|
{self.output_format}
|
|
The simulator user can use to test your model:
|
|
{self.simulator}
|
|
"""
|