From f78afce0c90c151f13e97f5b5e0af86d45a61dd4 Mon Sep 17 00:00:00 2001 From: Keming Date: Wed, 21 Jun 2023 14:49:22 +0800 Subject: [PATCH] feat: align the chat & completion response interface (#43) Signed-off-by: Keming --- llmspec/llmspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llmspec/llmspec.py b/llmspec/llmspec.py index d83ab0c..a2f6446 100644 --- a/llmspec/llmspec.py +++ b/llmspec/llmspec.py @@ -144,11 +144,11 @@ class ChatResponse(LMResponse): def from_message( cls, message: str, - role: Role, model: str, finish_reason: str, prompt_token: int, completion_token: int, + role: Role = Role.ASSISTANT, ): return cls( id=str(uuid.uuid4()),