mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-09-19 00:01:33 +00:00
Some checks are pending
Pre-commit / run (ubuntu-latest) (push) Waiting to run
- Implement BaseComponent with async lifecycle and context management - Add ApplicationContext for managing component initialization and registry - Create Application class for orchestrating job execution and lifecycle - Add AS LLM components with OpenAI chat model wrapper - Implement AS LLM formatter components with OpenAI formatter - Add client implementations including base, HTTP and ReMe clients - Create embedding model base class with caching and batching support - Implement file store base class with vector and full-text search - Add file watcher components for monitoring file system changes - Create job components for executing workflows - Implement service components for exposing jobs via different protocols - Add configuration schema with ApplicationConfig and ComponentConfig - Include utility modules for case conversion, chunking, logging and similarity - Register component types and create component registry system
27 lines
997 B
Python
27 lines
997 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")
|