diff options
Diffstat (limited to 'g4f/Provider/AiService.py')
-rw-r--r-- | g4f/Provider/AiService.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/Provider/AiService.py b/g4f/Provider/AiService.py index f4de2836..2b5a6e7d 100644 --- a/g4f/Provider/AiService.py +++ b/g4f/Provider/AiService.py @@ -18,10 +18,8 @@ class AiService(BaseProvider): stream: bool, **kwargs: Any, ) -> CreateResult: - base = "" - for message in messages: - base += "%s: %s\n" % (message["role"], message["content"]) - base += "assistant:" + base = "\n".join(f"{message['role']}: {message['content']}" for message in messages) + base += "\nassistant: " headers = { "accept": "*/*", |