shell_gpt icon indicating copy to clipboard operation
shell_gpt copied to clipboard

'NoneType' object has no attribute 'tool_calls'

Open arty-hlr opened this issue 11 months ago • 0 comments

Using open-webui as backend, this is my config file:

CHAT_CACHE_PATH=/tmp/chat_cache
CACHE_PATH=/tmp/cache
CHAT_CACHE_LENGTH=100
CACHE_LENGTH=100
REQUEST_TIMEOUT=60
DEFAULT_MODEL=llama3.1:latest
DEFAULT_COLOR=magenta
ROLE_STORAGE_PATH=/home/peng/.config/shell_gpt/roles
DEFAULT_EXECUTE_SHELL_CMD=false
DISABLE_STREAMING=false
CODE_THEME=dracula
OPENAI_FUNCTIONS_PATH=/home/peng/.config/shell_gpt/functions
OPENAI_USE_FUNCTIONS=false
SHOW_FUNCTIONS_OUTPUT=false
API_BASE_URL=http://XX.XX.XX.XX:3000/api
PRETTIFY_MARKDOWN=true
USE_LITELLM=false
SHELL_INTERACTION=true
OS_NAME=auto
SHELL_NAME=auto
OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXX

Running a simple command I get this error: image

It seems to come from this script:

https://github.com/TheR1D/shell_gpt/blob/aac2f5461b0d113dfdbfb6e926506c070d6afb52/sgpt/handlers/handler.py#L121

This sounds related and could be a fix as somehow open webui's responses don't have a delta:

https://github.com/run-llama/llama_index/issues/16570#issuecomment-2416893667

arty-hlr avatar Jan 06 '25 13:01 arty-hlr