From d10f5d6b4d21409398bd8a816b7b1e29002bb4c0 Mon Sep 17 00:00:00 2001 From: kqlio67 Date: Mon, 21 Oct 2024 10:32:32 +0300 Subject: 1 --- g4f/Provider/nexra/NexraBlackbox.py | 2 +- g4f/models.py | 3 ++- main.py | 9 +++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 main.py diff --git a/g4f/Provider/nexra/NexraBlackbox.py b/g4f/Provider/nexra/NexraBlackbox.py index ec3d57c6..87eea8e2 100644 --- a/g4f/Provider/nexra/NexraBlackbox.py +++ b/g4f/Provider/nexra/NexraBlackbox.py @@ -9,7 +9,7 @@ from ..helper import format_prompt class NexraBlackbox(AbstractProvider, ProviderModelMixin): url = "https://nexra.aryahcr.cc/api/chat/complements" - working = False + working = True supports_stream = True default_model = "blackbox" diff --git a/g4f/models.py b/g4f/models.py index 99778f0b..ecea56bd 100644 --- a/g4f/models.py +++ b/g4f/models.py @@ -443,7 +443,8 @@ reka_core = Model( blackboxai = Model( name = 'blackboxai', base_provider = 'Blackbox AI', - best_provider = IterListProvider([Blackbox, NexraBlackbox]) + #best_provider = IterListProvider([Blackbox, NexraBlackbox]) + best_provider = IterListProvider([NexraBlackbox]) ) blackboxai_pro = Model( diff --git a/main.py b/main.py new file mode 100644 index 00000000..4631ac11 --- /dev/null +++ b/main.py @@ -0,0 +1,9 @@ +from g4f.client import Client + +client = Client() +response = client.chat.completions.create( + model="blackboxai", + messages=[{"role": "user", "content": "Hello"}], + # Add any other necessary parameters +) +print(response.choices[0].message.content) -- cgit v1.2.3