Comments (8)
same here, using litellm
from taskweaver.
The issue might be due to an incorrect response from LLM, as we verify all required fields in the generated JSON text. If any missing fields are found, an exception arises.
from taskweaver.
You must set llm.response_format parameter in json config file of taskweaver to "text".
The api on local llm cannot talk in the default json setting.
from taskweaver.
I get a similar error running local model - but not every time:
Error: Cannot process your request due to Exception: 'NoneType' object has no attribute 'content'
Traceback (most recent call last):
File "C:\PythonPlay\TaskWeaver\taskweaver\session\session.py", line 125, in send_message
post = _send_message(post.send_to, post)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PythonPlay\TaskWeaver\taskweaver\session\session.py", line 107, in _send_message
reply_post = self.code_interpreter.reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\PythonPlay\TaskWeaver\taskweaver\code_interpreter\code_interpreter.py", line 70, in reply
code.content,
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'content'
from taskweaver.
Same issue; however I keep getting consistently the same error. I'm stuck with this basically. This was the prompt: "Process the PDF file you can find in the sample_data folder, and add up all the expenses making sure all the ammounts in Euros are first converted to USD and then summed to
all the amounts that were already reported in USD"
It starts off nicely making a plan:
>>> [INIT_PLAN]
1. Locate and read the PDF file in the sample_data folder
2. Extract text from the PDF file <sequential depend on 1>
3. Identify and extract amounts in Euros and USD from the text <sequential depend on 2>
4. Convert amounts in Euros to USD <sequential depend on 3>
5. Sum all amounts in USD <sequential depend on 4>
>>> [PLAN]
1. Locate and read the PDF file in the sample_data folder
2. Extract text from the PDF file
3. Identify and extract amounts in Euros and USD from the text
4. Convert amounts in Euros to USD
5. Sum all amounts in USD
>>> [CURRENT_PLAN_STEP]
Locate and read the PDF file in the sample_data folder
>>> [SEND_TO]
CodeInterpreter
>>> [MESSAGE]
Please locate and read the PDF file in the sample_data folder.
>>> [PLANNER->CODEINTERPRETER]
Please locate and read the PDF file in the sample_data folder.
But then always fails like below, apparently over the first step to locate and read the PDF:
Error: Cannot process your request due to Exception: 'NoneType' object has no attribute 'content'
Traceback (most recent call last):
File "/Users/~~~~~~/Development/code/TW/TaskWeaver/taskweaver/session/session.py", line 125, in send_message
post = _send_message(post.send_to, post)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/~~~~~~/Development/code/TW/TaskWeaver/taskweaver/session/session.py", line 107, in _send_message
reply_post = self.code_interpreter.reply(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/~~~~~~/Development/code/TW/TaskWeaver/taskweaver/code_interpreter/code_interpreter.py", line 70, in reply
code.content,
^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'content'
UPDATE:
I even tried 1) feeding it a much smaller PDF file (about 7 pages) and 2) actually parsing the PDF file and manually converting it to a txt file with amounts in Euros or USD on each line. With quite surprise I found out that even feeding it a 28 lines of text (each amount on its line), will still lead to the very same error reported above 😵💫
from taskweaver.
Taskweaver does not "see" the sample_data folder - I had the same problem. Once you start a new taskweaver session, you have to find the latest session directory and go into the "cwd" directory of it (cwd stands for current working directory). If you put your file in there, you can then refer to it by name without a path and it will see it. I still have the errors above but it does find and work with my file.
from taskweaver.
Yeah thanks for the advice; I tried putting the file in the cwd
folder and it seems like it's able to find the file. But yeah after all I'm still ending up with the same AttributeError: 'NoneType' object has no attribute 'content'
from taskweaver.
Yes, I find if I keep the tasks simple or give it one step at a time, I can sometimes get things to complete without the error. I wonder what triggers that problem.
from taskweaver.
Related Issues (20)
- Exporting and importing experience HOT 3
- `enabled` paramter in `example_planner.yaml` is invalid HOT 1
- could i use taskweaver by api? HOT 11
- Choose different roles according to needs HOT 3
- could i load a historical session in worksapce? HOT 3
- get `httpx.RemoteProtocolError` error when using openai api HOT 2
- [chainlit UI]
- multi role in ext_role HOT 3
- No current event in loop error how to solve HOT 1
- Error on creating a new role HOT 1
- How to access the attachment of type image/PDF in a new role HOT 2
- what should I do when i want to add some prompt? HOT 3
- when using TaskWeaver as a library, how to output log HOT 1
- ggml cuda errors with ollama llms HOT 4
- Open-source plugins HOT 1
- Results in tabular format are truncated HOT 3
- How to set data and its descriptions without prompting in each session to load data HOT 1
- Plugin can't find an installed package HOT 12
- issues after upgrading to python 3.12 on windows: interface fails to load HOT 4
- A plugin is automatically generated for each function at runtime if a plugin needed HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taskweaver.