From a1c67d9e408269a7a1540e8c84557239ea93adde Mon Sep 17 00:00:00 2001 From: "jinli.yl" Date: Mon, 24 Jun 2024 18:24:40 +0800 Subject: [PATCH] [dev] modify model response delta --- memory_scope/models/response.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/memory_scope/models/response.py b/memory_scope/models/response.py index 72e98a44..83935e00 100644 --- a/memory_scope/models/response.py +++ b/memory_scope/models/response.py @@ -8,6 +8,8 @@ from memory_scope.enumeration.model_enum import ModelEnum class ModelResponse(BaseModel): text: str = Field("", description="generation model result") + delta: str = Field("", description="New text that just streamed in (only used when streaming)") + embedding_results: List[List[float]] | List[float] = Field([], description="embedding vector") rank_scores: List[Dict[int, float]] = Field([], description="The rank scores of each documents. " @@ -22,6 +24,5 @@ class ModelResponse(BaseModel): raw: Any = Field("", description="Raw response from model call") - delta: str = Field("", description="New text that just streamed in (only used when streaming)") ModelResponseGen = Generator[ModelResponse, None, None]