From a26421bcd8b8580650fa05b3fb4f8fdfa0ef9921 Mon Sep 17 00:00:00 2001 From: Heiner Lohaus Date: Sun, 21 Apr 2024 15:15:55 +0200 Subject: Add image model list --- g4f/providers/helper.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'g4f/providers/helper.py') diff --git a/g4f/providers/helper.py b/g4f/providers/helper.py index 0ec9aac2..7ebe0d02 100644 --- a/g4f/providers/helper.py +++ b/g4f/providers/helper.py @@ -3,7 +3,7 @@ from __future__ import annotations import random import string -from ..typing import Messages +from ..typing import Messages, Cookies def format_prompt(messages: Messages, add_special_tokens=False) -> str: """ @@ -56,4 +56,7 @@ def filter_none(**kwargs) -> dict: key: value for key, value in kwargs.items() if value is not None - } \ No newline at end of file + } + +def format_cookies(cookies: Cookies) -> str: + return "; ".join([f"{k}={v}" for k, v in cookies.items()]) \ No newline at end of file -- cgit v1.2.3