Add prompt improvement button in drawer
This commit is contained in:
@@ -636,3 +636,26 @@ class BatchRunSnapshotOut(CamelModel):
|
||||
started_at: datetime
|
||||
finished_at: datetime | None
|
||||
stop_reason: StopReason | None
|
||||
|
||||
|
||||
class PromptImprovementChange(CamelModel):
|
||||
before: str = Field(max_length=100_000)
|
||||
after: str = Field(min_length=1, max_length=100_000)
|
||||
reason: str = Field(min_length=1, max_length=4_000)
|
||||
evidence: list[str] = Field(default_factory=list, max_length=8)
|
||||
|
||||
|
||||
class PromptImprovementManualRecommendation(CamelModel):
|
||||
category: Literal["tool", "test_case", "other"]
|
||||
title: str = Field(min_length=1, max_length=200)
|
||||
detail: str = Field(min_length=1, max_length=4_000)
|
||||
|
||||
|
||||
class PromptImprovementOut(CamelModel):
|
||||
diagnosis: str = Field(min_length=1, max_length=4_000)
|
||||
prompt_change: PromptImprovementChange | None = None
|
||||
manual_recommendations: list[PromptImprovementManualRecommendation] = Field(
|
||||
default_factory=list,
|
||||
max_length=20,
|
||||
)
|
||||
evaluator_name: str = Field(min_length=1, max_length=128)
|
||||
|
||||
Reference in New Issue
Block a user