microsoft / PubSec-Info-Assistant

Information Assistant, built with Azure OpenAI Service, Industry Accelerator
MIT License
348 stars 788 forks source link

WebApp fails to startup due to mathassistant.py issue #917

Open ryonsteelemsft opened 3 days ago

ryonsteelemsft commented 3 days ago

Bug Details

Environment is GCC High but I dont think this matters here.

The step was a straight make deploy with secure flag off using gpt-35-turbo. The infra and webapp built and deployed but I was seeing this in the logs, failing to startup:

File "/home/site/wwwroot/app.py", line from approaches.mathas File "/home/site/wwwroot/approaches/mathassistant.py", line 1 tools = load_tools(["llm-math","wikipedia ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/langchain_core/load/serializable.py", line 1 super().__init__(* File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 2 validated_self = self.__pydantic_validator__.validate_python(data, self ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/pydantic/_internal/_mock_val_ser.py", line 100, raise PydanticUserError(self._error_message, c pydantic.errors.PydanticUserError:LLMMathChainis not fully defined; you should defineBaseCache, then call LLMMathChain.model_rebuild().

Steps To Reproduce

  1. Pull and make deploy from main branch, it is 100% reproducible for me.
  2. Webapp frontend will not be available and fails to startup
  3. Investigate LogStream or Workbook to see above logs

Information Assistant details

Please provide the following details. You can simply include a screenshot of your Info panel as well.

GitHub branch: main as of this ticket creation

What region is your Azure Open AI Service in? usgovvirginia What ChatGPT model are you using? gpt-35-turbo model name: (i.e. gpt-3.5-turbo, gpt-4) gpt-35-turbo model version: (i.e. 0613) 1106 What embeddings model are you using? text-embedding-ada-02

Additional context PR Coming for consideration or iteration

If the bug is confirmed, would you be willing to submit a PR?