diff options
Diffstat (limited to 'g4f/client/stubs.py')
-rw-r--r-- | g4f/client/stubs.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/g4f/client/stubs.py b/g4f/client/stubs.py index 2441e287..ceb51b83 100644 --- a/g4f/client/stubs.py +++ b/g4f/client/stubs.py @@ -78,12 +78,14 @@ class ChatCompletionDelta(Model): def __init__(self, content: Union[str, None]): if content is not None: self.content = content + self.role = "assistant" def to_json(self): return self.__dict__ class ChatCompletionDeltaChoice(Model): def __init__(self, delta: ChatCompletionDelta, finish_reason: Union[str, None]): + self.index = 0 self.delta = delta self.finish_reason = finish_reason |