Unify the 3 interface modes (#3554)

This commit is contained in:
oobabooga 2023-08-13 01:12:15 -03:00 committed by GitHub
parent bf70c19603
commit a1a9ec895d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 660 additions and 714 deletions

View file

@ -4,7 +4,7 @@ import textwrap
import gradio as gr
from bs4 import BeautifulSoup
from modules import chat, shared
from modules import chat
from modules.logging_colors import logger
from .chromadb import add_chunks_to_collector, make_collector
@ -143,8 +143,8 @@ def remove_special_tokens(string):
return re.sub(pattern, '', string)
def input_modifier(string):
if shared.is_chat():
def input_modifier(string, state, is_chat=False):
if is_chat:
return string
# Find the user input