diff options
author | hs_junxiang <jimmy871117@gmail.com> | 2023-09-04 07:34:31 +0200 |
---|---|---|
committer | hs_junxiang <jimmy871117@gmail.com> | 2023-09-04 07:41:22 +0200 |
commit | 17c9adf4852a0ca0d1a5cfa448478fa195a9c368 (patch) | |
tree | 070475a0003dde9f0815e7fe98f907f029f3c916 /g4f/Provider/Bing.py | |
parent | ~ | Merge pull request #872 (diff) | |
download | gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.gz gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.bz2 gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.lz gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.xz gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.tar.zst gpt4free-17c9adf4852a0ca0d1a5cfa448478fa195a9c368.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Bing.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/g4f/Provider/Bing.py b/g4f/Provider/Bing.py index 48968e39..1642877d 100644 --- a/g4f/Provider/Bing.py +++ b/g4f/Provider/Bing.py @@ -40,10 +40,7 @@ class Bing(AsyncGeneratorProvider): return stream_generate(prompt, context, cookies_dict) def create_context(messages: list[dict[str, str]]): - context = "" - - for message in messages: - context += "[%s](#message)\n%s\n\n" % (message["role"], message["content"]) + context = "".join(f"[{message['role']}](#message)\n{message['content']}\n\n" for message in messages) return context |