amosjyng / langchain-visualizer

Visualization and debugging tool for LangChain workflows
MIT License
718 stars 51 forks source link

can't run visualizer when agent type is `OPENAI_FUNCTIONS` or multi functions #65

Closed AndrewMacho closed 1 year ago

AndrewMacho commented 1 year ago
~/.pyenv/versions/3.11.4/lib/python3.11/inspect.py:3201 in _bind                       │
│                                                                                                  │
│   3198 │   │   │   │   # Process our '**kwargs'-like parameter                                   │
│   3199 │   │   │   │   arguments[kwargs_param.name] = kwargs                                     │
│   3200 │   │   │   else:                                                                         │
│ ❱ 3201 │   │   │   │   raise TypeError(                                                          │
│   3202 │   │   │   │   │   'got an unexpected keyword argument {arg!r}'.format(                  │
│   3203 │   │   │   │   │   │   arg=next(iter(kwargs))))                                          │
│   3204                                                                                           │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: got an unexpected keyword argument 'functions'
amosjyng commented 1 year ago

Thanks for letting me know! I've merged #66 , can you please check if v0.0.27 of langchain-visualizer works for you?

I haven't had the time to try out multi-functions yet, so I'm not sure if that will work with these changes

AndrewMacho commented 1 year ago

Thank you for fix! It seems like it does work, thanks! I do not have a case with multi-functions however

amosjyng commented 1 year ago

No problem! I've added better rendering support for multi-functions anyways in the latest release, v0.0.28 :)