fix: configure codex with a longer timeout
refactor: param names
This commit is contained in:
@@ -51,9 +51,10 @@ from tools.simple.base import SimpleTool
|
||||
|
||||
class ChatRequest(ToolRequest):
|
||||
prompt: str = Field(..., description="Your question or idea.")
|
||||
files: list[str] | None = Field(default_factory=list)
|
||||
working_directory: str = Field(
|
||||
..., description="Absolute full directory path where the assistant AI can save generated code for implementation."
|
||||
absolute_file_paths: list[str] | None = Field(default_factory=list)
|
||||
working_directory_absolute_path: str = Field(
|
||||
...,
|
||||
description="Absolute path to an existing directory where generated code can be saved.",
|
||||
)
|
||||
|
||||
class ChatTool(SimpleTool):
|
||||
@@ -72,15 +73,15 @@ class ChatTool(SimpleTool):
|
||||
def get_tool_fields(self) -> dict[str, dict[str, object]]:
|
||||
return {
|
||||
"prompt": {"type": "string", "description": "Your question."},
|
||||
"files": SimpleTool.FILES_FIELD,
|
||||
"working_directory": {
|
||||
"absolute_file_paths": SimpleTool.FILES_FIELD,
|
||||
"working_directory_absolute_path": {
|
||||
"type": "string",
|
||||
"description": "Absolute full directory path where the assistant AI can save generated code for implementation.",
|
||||
"description": "Absolute path to an existing directory for generated code artifacts.",
|
||||
},
|
||||
}
|
||||
|
||||
def get_required_fields(self) -> list[str]:
|
||||
return ["prompt", "working_directory"]
|
||||
return ["prompt", "working_directory_absolute_path"]
|
||||
|
||||
async def prepare_prompt(self, request: ChatRequest) -> str:
|
||||
return self.prepare_chat_style_prompt(request)
|
||||
|
||||
Reference in New Issue
Block a user