microsoft / TaskWeaver

A code-first agent framework for seamlessly planning and executing data analytics tasks.
https://microsoft.github.io/TaskWeaver/
MIT License
5.19k stars 661 forks source link

PDF Summary Plugin dosen't work #202

Closed AutoAPEAI closed 6 months ago

AutoAPEAI commented 7 months ago

Describe the bug After I uploaded a pdf file and asked the agent to summarize for me, the error pops says that it's not able to fetch any LLM config details.

The execution of the generated python code above has failed

During execution, the following messages were logged: Traceback (most recent call last):

Cell In[2], line 2 summary, description = paper_summary("PhD_Thesis_ChaoyangHeApril_2022.pdf")

File /var/folders/mv/km2zkg_514d6dzr1mb_j92y00000gn/T/tmp7bzg3y0b/paper_summary.py:23 in call

File :684 in setitem

File :758 in encode

TypeError: str expected, not NoneType

2024-02-09 16:30:07 - Use back up engine: True 2024-02-09 16:30:09 - HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"

To Reproduce Steps to reproduce the behavior:

  1. Start the service using chainlit run app.py
  2. Uploaded a pdf file
  3. Type the user query "can you summarize the pdf for me"
  4. Wait for the response
  5. See error

Expected behavior The expected result is that agent will generate a summary according to the pre-built prompt

Screenshots

image

Environment Information (please complete the following information):

Additional context None

zhangxu0307 commented 7 months ago

Hi, @AutoAPEAI ! Did you configurate the llm parameters in this YAML file?

AutoAPEAI commented 6 months ago

Hi, @AutoAPEAI ! Did you configurate the llm parameters in this YAML file?

Thx, it worked now!