Search code examples
pythonapache-sparkchatlangchainlarge-language-model

Getting 'AppIdNoAuthError' in iFlyTek Spark Integration


I am trying to use Spark API from iFlytek where getting AppIdNoAuthError

Langchain Reference:https://python.langchain.com/docs/integrations/chat/sparkllm

Please advise


Solution

  • I enabled only 3.5 chat model. So, I need to pass it to LLM

    chat = ChatSparkLLM(
        spark_api_url="wss://spark-api.xf-yun.com/v3.5/chat",
        spark_app_id="****", spark_api_key="***", spark_api_secret="**"
    )
    

    Then it worked fine, Thanks