From e9467297369dd4f429c084bd1d034f3b1b63e7c2 Mon Sep 17 00:00:00 2001 From: abc <98614666+xtekky@users.noreply.github.com> Date: Sun, 16 Jul 2023 20:31:51 +0100 Subject: minor fixes --- g4f/Provider/Providers/H2o.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'g4f/Provider/Providers/H2o.py') diff --git a/g4f/Provider/Providers/H2o.py b/g4f/Provider/Providers/H2o.py index 4400f3a9..92043026 100644 --- a/g4f/Provider/Providers/H2o.py +++ b/g4f/Provider/Providers/H2o.py @@ -10,6 +10,7 @@ url = 'https://gpt-gm.h2o.ai' model = ['falcon-40b', 'falcon-7b', 'llama-13b'] supports_stream = True needs_auth = False +working = True models = { 'falcon-7b': 'h2oai/h2ogpt-gm-oasst1-en-2048-falcon-7b-v3', @@ -18,6 +19,7 @@ models = { } def _create_completion(model: str, messages: list, stream: bool, **kwargs): + conversation = '' for message in messages: conversation += '%s: %s\n' % (message['role'], message['content']) @@ -47,8 +49,6 @@ def _create_completion(model: str, messages: list, stream: bool, **kwargs): } response = session.post("https://gpt-gm.h2o.ai/settings", headers=headers, data=data) - - headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0", "Accept": "*/*", -- cgit v1.2.3