AndrewVeee / nucleo-ai

An AI assistant beyond the chat box.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

missing title error: args["title"] -> args[" title"]

fraschm1998 opened this issue · comments

Need to change args['title'] to args[' title'] or change dictionary to use 'title' instead of ' title'

Error:

Exception in thread Thread-9 (handler):                                                                                                                                                                              
Traceback (most recent call last):                                                                                                                                                                                   
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner                                                                                                                                            
    self.run()                                                                                                                                                                                                       
  File "/usr/lib/python3.11/threading.py", line 982, in run                                                                                                                                                          
    self._target(*self._args, **self._kwargs)                                                                                                                                                                        
  File "/home/epyc/ai/nucleo-ai/backend/app/ai_models/assistant_model2.py", line 156, in handler                                                                                                                     
    chain.run()                                                                                                                                                                                                      
  File "/home/epyc/ai/nucleo-ai/backend/app/ai_models/ai_model_base.py", line 98, in run                                                                                                                             
    res = self.instance.run_next()                                                                                                                                                                                   
          ^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                   
  File "/home/epyc/ai/nucleo-ai/backend/ai_tools/prompt_chain/chain.py", line 75, in run_next                                                                                                                        
    result = entry.run(self)                                                                                                                                                                                         
             ^^^^^^^^^^^^^^^                                                                                                                                                                                         
  File "/home/epyc/ai/nucleo-ai/backend/ai_tools/prompt_chain/entry.py", line 100, in run                                                                                                                            
    result = self.runner(instance)                                                                                                                                                                                   
             ^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                                   
  File "/home/epyc/ai/nucleo-ai/backend/app/ai_models/assistant_model2.py", line 67, in runner                                                                                                                       
    runner.run()                                                                                                                                                                                                     
  File "/home/epyc/ai/nucleo-ai/backend/app/ai_models/ai_model_base.py", line 98, in run               
    res = self.instance.run_next()                                                                     
          ^^^^^^^^^^^^^^^^^^^^^^^^                                                                     
  File "/home/epyc/ai/nucleo-ai/backend/ai_tools/prompt_chain/chain.py", line 75, in run_next          
    result = entry.run(self)                                                                           
             ^^^^^^^^^^^^^^^                                                                           
  File "/home/epyc/ai/nucleo-ai/backend/ai_tools/prompt_chain/entry.py", line 100, in run              
    result = self.runner(instance)                                                                     
             ^^^^^^^^^^^^^^^^^^^^^                                                                     
  File "/home/epyc/ai/nucleo-ai/backend/ai_tools/prompt_chain/entry.py", line 122, in runner           
    self.fn(instance, response, self.opts)                                                             
  File "/home/epyc/ai/nucleo-ai/backend/app/ai_models/function_chain_simple.py", line 71, in call_function
    result = fn.handler(inst, inst.get_opt('function_arguments'))                                      
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                      
  File "/home/epyc/ai/nucleo-ai/backend/app/functions/functions.py", line 187, in run                  
    "result": f"Created doc: {args['title']}",                                                         
                              ~~~~^^^^^^^^^                                                            
KeyError: 'title'                                                                                      
^C^CException ignored in atexit callback: <bound method Client.join of <posthog.client.Client object at 0x7fe952d82d50>>
Traceback (most recent call last):                                                                     
  File "/home/epyc/ai/nucleo-ai/env/lib/python3.11/site-packages/posthog/client.py", line 416, in join 
    consumer.join()                                                                                    
  File "/usr/lib/python3.11/threading.py", line 1119, in join                                          
    self._wait_for_tstate_lock()                                                                       
  File "/usr/lib/python3.11/threading.py", line 1139, in _wait_for_tstate_lock                         
    if lock.acquire(block, timeout):                                                                   
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^       
KeyboardInterrupt:               

Sorry for not responding to this sooner.

This is a weird issue. It looks like it made it past the part where it saved the doc using args['title'] for the name. Do you see the doc in in the Docs tab?