summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/AItianhu.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/AItianhu.py')
-rw-r--r--g4f/Provider/AItianhu.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/g4f/Provider/AItianhu.py b/g4f/Provider/AItianhu.py
index 4458c14f..0982d3c6 100644
--- a/g4f/Provider/AItianhu.py
+++ b/g4f/Provider/AItianhu.py
@@ -19,10 +19,8 @@ class AItianhu(BaseProvider):
messages: list[dict[str, str]],
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 = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
hhhhhh