Update app.py
Browse files106 unmodified lines10710810911011111211311477 unmodified lines19219319419319519619719814 unmodified lines213214215214216217218219106 unmodified lines return FAISS.from_documents(documents, embed)
def get_response_with_search(query, model, system_prompt=DEFAULT_SYSTEM_PROMPT, num_calls=3, temperature=0.2, use_embeddings=True): logging.info(f"get_response_with_search - Query: {query}") logging.info(f"get_response_with_search - System Prompt: {system_prompt}") search_results = duckduckgo_search(query) if use_embeddings:77 unmodified lines"""
demo = gr.ChatInterface( respond, fn=lambda message, system_prompt, history, model, temperature, num_calls, use_embeddings: respond(message, system_prompt, history, model, temperature, num_calls, use_embeddings), additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=True, render=False), additional_inputs=[ gr.Textbox(label="System Prompt", lines=5, value=DEFAULT_SYSTEM_PROMPT),14 unmodified lines cache_examples=False, analytics_enabled=False, textbox=gr.Textbox(placeholder="Ask a question", container=False, scale=7), chatbot = gr.Chatbot( chatbot=gr.Chatbot( show_copy_button=True, likeable=True, layout="bubble",app.py+4-2