mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-17 23:51:19 +00:00
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
- Introduce BaseAsTokenCounter and EstimatedAsTokenCounter for token estimation - Add AsMsgStat and AsBlockStat schema for message statistics tracking - Implement FileIO class with read/write/append/edit operations - Create file utility functions for safe async file reading and truncation - Add MemorySearch component for semantic search in memory files - Register new component types in ComponentEnum and update imports - Add constants for default host, port, and truncation limits - Create BaseService abstract base class for service implementations - Implement BaseStep with component accessors and lifecycle management - Add proper __all__ exports for all new modules and components
25 lines
722 B
Python
25 lines
722 B
Python
"""Request schema module.
|
|
|
|
This module defines the Request model for handling incoming requests
|
|
in the application service layer.
|
|
"""
|
|
|
|
from pydantic import BaseModel, ConfigDict, Field
|
|
|
|
|
|
class Request(BaseModel):
|
|
"""Request model for service endpoints.
|
|
|
|
Represents an incoming request with optional metadata and
|
|
extensible fields for various request types.
|
|
|
|
The model uses ConfigDict with extra="allow" to support
|
|
dynamically added fields while maintaining type safety.
|
|
|
|
Attributes:
|
|
metadata: Request-level metadata for tracking and context.
|
|
"""
|
|
|
|
model_config = ConfigDict(extra="allow")
|
|
|
|
metadata: dict = Field(default_factory=dict, description="Request metadata for context")
|