mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-12 23:01:15 +00:00
15 lines
574 B
Python
15 lines
574 B
Python
"""Response schema for service endpoints and LLM calls."""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class Response(BaseModel):
|
|
"""Standard response envelope; extra fields allowed for endpoint-specific output."""
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
answer: str | Any = Field(default="", description="Response content or result data")
|
|
success: bool = Field(default=True, description="Whether the operation succeeded")
|
|
metadata: dict = Field(default_factory=dict, description="Additional context and diagnostics")
|