repo_description: Grounded search engine (i.e. with source reference) based on LLM / ChatGPT / OpenAI API. It supports web search, file content search etc.
repo_topics: ai chatgpt grounded-api grounded-bot language-model llm machine-learning nlp nlp-machine-learning openai python retrieval retrieval-model
code: import gradio as gr
  
  from SearchGPTService import SearchGPTService
  
  
  def query_and_get_answer(search_text):
      search_gpt_service = SearchGPTService()
      response_text, source_text, data_json = search_gpt_service.query_and_get_answer(search_text)
      return response_text, source_text
  
  
  demo = gr.Interface(fn=query_and_get_answer,
                      inputs=gr.Textbox(placeholder="What is chatgpt"),
                      outputs=["text", "text", "text"])
  demo.launch()
  