Coder Social home page Coder Social logo

Comments (17)

ashpreetbedi avatar ashpreetbedi commented on May 26, 2024

@renkelvin here to help, can you share the log when you run with debug_mode=True like Assistant(debug_mode=True)

This seems like a type error somewhere which i would like to fix asap :)

from phidata.

renkelvin avatar renkelvin commented on May 26, 2024

Thanks @ashpreetbedi . I've set debug_mode=True while the output looks identical. Did I miss anything?

UnprocessableEntityError: Error code: 422 - {'detail': [{'type': 'string_type', 'loc': ['body', 'tools', 0, 'function', 'parameters', 'properties', 'num_chats', 'type'], 'msg': 'Input should be a valid string', 'input': ['number', 'null'], 'url': 'https://errors.pydantic.dev/2.6/v/string_type'}]}
Traceback:
File "/usr/local/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 584, in _run_script
    exec(code, module.__dict__)
File "/usr/local/app/app/pages/Coffee_Assistant.py", line 199, in <module>
    main()
File "/usr/local/app/app/pages/Coffee_Assistant.py", line 115, in main
    for delta in coffee_assistant.run(question):
File "/usr/local/lib/python3.11/site-packages/phi/assistant/assistant.py", line 529, in _run
    for chunk in current_task.run(message=current_task_message, stream=True, **kwargs):
File "/usr/local/lib/python3.11/site-packages/phi/task/llm/llm_task.py", line 598, in _run
    for response_chunk in self.llm.response_stream(messages=messages):
File "/usr/local/lib/python3.11/site-packages/phi/llm/openai/chat.py", line 436, in response_stream
    for response in self.invoke_stream(messages=messages):
File "/usr/local/lib/python3.11/site-packages/phi/llm/openai/chat.py", line 174, in invoke_stream
    yield from self.client.chat.completions.create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/_utils/_utils.py", line 277, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/resources/chat/completions.py", line 579, in create
    return self._post(
           ^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1240, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 921, in request
    return self._request(
           ^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/openai/_base_client.py", line 1020, in _request
    raise self._make_status_error_from_response(err.response) from None

from phidata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.