mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-19 00:01:33 +00:00
- Add BaseClient, BaseFileStore, BaseFileWatcher, BaseJob, BaseService, and BaseStep classes - Move component initialization logic from ApplicationContext to Application class - Add logo printing and logging initialization in Application startup - Create client module with base client implementation - Add file store base class with embedding resolution and validation - Implement file watcher base class with watchfiles integration - Add job base class for sequential step execution orchestration - Create service base class for job exposure mechanisms - Refactor BaseStep with LLM workflow execution capabilities - Add case converter utility for naming convention transformations - Update import structure and module organization - Add proper type hints and docstrings across all components - Implement component registry integration for dynamic loading - Add error handling for missing backend configurations
28 lines
998 B
Python
28 lines
998 B
Python
"""Response schema module.
|
|
|
|
This module defines the standardized data structure for model output
|
|
responses used throughout the application.
|
|
"""
|
|
|
|
from typing import Any
|
|
|
|
from pydantic import BaseModel, Field, ConfigDict
|
|
|
|
|
|
class Response(BaseModel):
|
|
"""Represents a structured response with result, status, and metadata.
|
|
|
|
This model provides a consistent interface for returning results
|
|
from operations, LLM calls, and service endpoints.
|
|
|
|
Attributes:
|
|
answer: The main response content, typically a string or structured data.
|
|
success: Whether the operation completed successfully.
|
|
metadata: Additional context and diagnostic information.
|
|
"""
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
answer: str | Any = Field(default="", description="Response content or result data")
|
|
success: bool = Field(default=True, description="Operation success status")
|
|
metadata: dict = Field(default_factory=dict, description="Additional context and diagnostics")
|