summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/V50.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/V50.py')
-rw-r--r--g4f/Provider/V50.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/g4f/Provider/V50.py b/g4f/Provider/V50.py
index 1dc7651d..81a95ba8 100644
--- a/g4f/Provider/V50.py
+++ b/g4f/Provider/V50.py
@@ -1,8 +1,13 @@
-import uuid, requests
+from __future__ import annotations
-from ..typing import Any, CreateResult
+import uuid
+
+import requests
+
+from ..typing import Any, CreateResult
from .base_provider import BaseProvider
+
class V50(BaseProvider):
url = 'https://p5.v50.ltd'
supports_gpt_35_turbo = True
@@ -16,11 +21,9 @@ class V50(BaseProvider):
messages: list[dict[str, str]],
stream: bool, **kwargs: Any) -> CreateResult:
- conversation = ''
- for message in messages:
- conversation += '%s: %s\n' % (message['role'], message['content'])
-
- conversation += 'assistant: '
+ conversation = "\n".join(f"{message['role']}: {message['content']}" for message in messages)
+ conversation += "\nassistant: "
+
payload = {
"prompt" : conversation,
"options" : {},