mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-03 11:24:57 -05:00
Update Pydantic dependency of `autogpt`, `forge` and `benchmark` to `^2.7` [Pydantic Migration Guide](https://docs.pydantic.dev/2.7/migration/) - Migrate usages of now-deprecated functions to their replacements - Update `Field` definitions - Ellipsis `...` for required fields is deprecated - `Field` no longer supports extra `kwargs`, replace use of this feature with field metadata - Replace `Config` class for specifying model configuration with `model_config = ConfigDict(..)` - Removed `ModelContainer` in `BaseAgent`, component configuration dict is now directly serialized using Pydantic v2 helper functions - Forked `agent-protocol` and updated `packages/client/python` for Pydantic v2 support: https://github.com/Significant-Gravitas/agent-protocol --------- Co-authored-by: Reinier van der Leer <pwuts@agpt.co>
19 lines
462 B
Python
19 lines
462 B
Python
from __future__ import annotations
|
|
|
|
from typing import Any, Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class TaskRequestBody(BaseModel):
|
|
input: str = Field(
|
|
min_length=1,
|
|
description="Input prompt for the task.",
|
|
examples=["Write the words you receive to the file 'output.txt'."],
|
|
)
|
|
additional_input: Optional[dict[str, Any]] = Field(default_factory=dict)
|
|
|
|
|
|
class TaskEvalRequestBody(TaskRequestBody):
|
|
eval_id: str
|