diff options
author | 碧舞すみほ <kokarare1212@gmail.com> | 2024-05-17 18:43:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 18:43:17 +0200 |
commit | 1d66c57a658d0a538c1836c56252aae2db11546d (patch) | |
tree | 1211ea782a659e6b94c967d8d0ea196fbbb114f6 /g4f/client | |
parent | Merge pull request #1958 from hlohaus/leech (diff) | |
download | gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar.gz gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar.bz2 gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar.lz gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar.xz gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.tar.zst gpt4free-1d66c57a658d0a538c1836c56252aae2db11546d.zip |
Diffstat (limited to 'g4f/client')
-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 |