danswer-ai / danswer

Gen-AI Chat for Teams - Think ChatGPT if it had access to your team's unique knowledge.
https://danswer.ai
Other
10.7k stars 1.34k forks source link

AI Answer report error in Search function #1099

Open dami2010 opened 9 months ago

dami2010 commented 9 months ago

When I add a file connector, and try to search content from the file, an error reported in AI Answer: "Expecting property name enclosed in double quotes: line 1 column 2 (char 1)"

danswer error

When I check the log of danswer-stack-api_server-1, I found following information:

02/19/2024 09:11:48 AM          qa_utils.py 264 : Raw Model QnA Output: {'answer': 'A digital product is a service, physical item, or digital item that provides an agreed and specific outcome for a consumer; that incorporates and requires software to realize that outcome; that is expected to require active management of the software by the provider over its lifecycle; and that is described by a formal offer of value that typically includes explicit pricing.', 'quotes': ['Typical characteristics of a Digital Product defined in this way are that it: • Includes one or more Service Offers  that define Contract options for consumers ; • Is delivered as a Digital Product Instance (defined below) described in a Contract that is based on a  Service Offer ; • Has a  Digital Product Instance that includes a System  containing technology resources and software ; • May be consumed within an organization or externally ; • May have dependencies on other Digital Products and non-digital products ; • Provides interactions via a machine and/or human interface.', "We propose the following definition for Digital Product : A service, physical item, or digital item that provides an agreed and specific outcome for a consumer; that incorporates and requires software to realize that outcome; that is expected to require active management of the software by the provider over its lifecycle; and that is described by a formal offer of value that typically includes explicit pricing.", 'The major technology analysis firms admit that business leaders agonize over the definition of Digital Product. We propose a definition of Digital Product that highlights the distinction between digital and non-digital products and provides clarity about use of this term, both in an IT management context and when describing the expanding universe of “smart” products ranging from roller bearings to cars.', 'Examples include smart appliances which connect to the Internet, requiring external IT systems and mobile applications to fully deliver value to users. For example, digital ovens (a type of oven that uses digital controls as the interface) can now be programmed by scanning the bar code on a food product using a mobile app, which provides the oven with cooking instructions via a cloud -based cooking instruction look -up system. Later, alert s can be sent to a smart watch to inform the user that cooking is complete .', 'An important category of Digital Product is the Digital Platform ; refer to Jeanne Ross et al, Designed for Digital  (see References). This is a product designed to enable creation or hosting of other Digital Products which can be sold or used by others.', 'Using “ Digital Product ” rather than “service” aligns with the semantics of trends such as DevOps and Agile, “Shift to Product” initiatives , reorganization of software development work into cross -functional teams , and the evolving language of Digital Transformation.']}
02/19/2024 09:11:48 AM   answer_question.py 273 : error='Expecting property name enclosed in double quotes: line 1 column 2 (char 1)'
Weves commented 9 months ago

Hey @dami2010, which LLM are you using?

dami2010 commented 9 months ago

The LLM I'm using is xinghuo from Chinese Vendor Xunfei. I configured xinghuo-api as FastChat model. Following is the configuration:

Gen AI Settings

  - GEN_AI_MODEL_PROVIDER=${GEN_AI_MODEL_PROVIDER:-}
  - GEN_AI_MODEL_VERSION=${GEN_AI_MODEL_VERSION:-xinghuo-api}
  - FAST_GEN_AI_MODEL_VERSION=${FAST_GEN_AI_MODEL_VERSION:-xinghuo-api}
  - GEN_AI_API_KEY=${GEN_AI_API_KEY:-}
  - GEN_AI_API_ENDPOINT=${GEN_AI_API_ENDPOINT:-http://172.17.51.33:20000/v1}
  - GEN_AI_API_VERSION=${GEN_AI_API_VERSION:-}
  - GEN_AI_LLM_PROVIDER_TYPE=${GEN_AI_LLM_PROVIDER_TYPE:-openai}
  - QA_TIMEOUT=${QA_TIMEOUT:-120}
dami2010 commented 9 months ago

@Weves It's interesting that the error should occur in Search model, but no error in Chat model.