diff options
author | H Lohaus <hlohaus@users.noreply.github.com> | 2024-11-20 19:58:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 19:58:16 +0100 |
commit | ffb4b0d162cc29b1caa4539d854de37206804225 (patch) | |
tree | ea565c46ed908d2a6b4ef3fef1f100e68428aec3 /g4f/client/helper.py | |
parent | Update api.py (diff) | |
download | gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.gz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.bz2 gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.lz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.xz gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.tar.zst gpt4free-ffb4b0d162cc29b1caa4539d854de37206804225.zip |
Diffstat (limited to 'g4f/client/helper.py')
-rw-r--r-- | g4f/client/helper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g4f/client/helper.py b/g4f/client/helper.py index 71bfd38a..93588c07 100644 --- a/g4f/client/helper.py +++ b/g4f/client/helper.py @@ -6,7 +6,7 @@ import threading import logging import asyncio -from typing import AsyncIterator, Iterator, AsyncGenerator +from typing import AsyncIterator, Iterator, AsyncGenerator, Optional def filter_json(text: str) -> str: """ @@ -23,7 +23,7 @@ def filter_json(text: str) -> str: return match.group("code") return text -def find_stop(stop, content: str, chunk: str = None): +def find_stop(stop: Optional[list[str]], content: str, chunk: str = None): first = -1 word = None if stop is not None: |