summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/AiService.py
diff options
context:
space:
mode:
Diffstat (limited to 'g4f/Provider/AiService.py')
-rw-r--r--g4f/Provider/AiService.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/g4f/Provider/AiService.py b/g4f/Provider/AiService.py
index 2c0d5de2..2b5a6e7d 100644
--- a/g4f/Provider/AiService.py
+++ b/g4f/Provider/AiService.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
import requests
from ..typing import Any, CreateResult
@@ -5,7 +7,7 @@ from .base_provider import BaseProvider
class AiService(BaseProvider):
- url = "https://aiservice.vercel.app/api/chat/answer"
+ url = "https://aiservice.vercel.app/"
working = False
supports_gpt_35_turbo = True
@@ -16,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": "*/*",