add ModelSettings.use_system_prompt

This commit is contained in:
Paul Gauthier 2024-09-12 14:19:53 -07:00
parent 71f3f3a22b
commit 8aee4d25ed
2 changed files with 27 additions and 4 deletions

View file

@ -966,10 +966,16 @@ class Coder:
chunks = ChatChunks()
chunks.system = [
dict(role="user", content=main_sys),
dict(role="assistant", content="Ok."),
]
if self.main_model.use_system_prompt:
chunks.system = [
dict(role="system", content=main_sys),
]
else:
chunks.system = [
dict(role="user", content=main_sys),
dict(role="assistant", content="Ok."),
]
chunks.examples = example_messages
self.summarize_end()

View file

@ -77,6 +77,7 @@ class ModelSettings:
max_tokens: Optional[int] = None
cache_control: bool = False
caches_by_default: bool = False
use_system_prompt: bool = True
# https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo
@ -425,6 +426,22 @@ MODEL_SETTINGS = [
lazy=True,
reminder="sys",
),
ModelSettings(
"openai/o1-mini",
"whole",
weak_model_name="openai/gpt-4o-mini",
use_repo_map=True,
reminder="user",
use_system_prompt=False,
),
ModelSettings(
"o1-mini",
"whole",
weak_model_name="gpt-4o-mini",
use_repo_map=True,
reminder="user",
use_system_prompt=False,
),
]