Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respond to more run status states and other GPT assistant housekeeping changes #665

Closed
wants to merge 10 commits into from

Commits on Nov 13, 2023

  1. respond to more run status states

    1) according to the spec there are other states we can handle in wait_for_run function, so I added those.
    2) added termination msg param.
    3) register_reply using invoke_assistant and check_termination_and_human_reply in order, so we can check for exit/human reply for human_input_mode != "NEVER". Remove the hardcoded human_input_mode.
    4) return empty array if while loop terminates for some reason without returning messages from the state machine (while loop)
    jagdeep sidhu committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    12e285e View commit details
    Browse the repository at this point in the history
  2. use user role when creating new messages from send() msgs

    I recieved
    ```
    openai.BadRequestError: Error code: 400 - {'error': {'message': "1 validation error for Request\nbody -> role\n  value is not a valid enumeration member; permitted: 'user' (type=type_error.enum; enum_values=[<RoleParam.USER: 'user'>])", 'type': 'invalid_request_error', 'param': None, 'code': None}}
    ```
    
    When using message["role"] which uses "assistant" for send messages but the API assumes only user role coming into new messages in thread. Not sure how it works for you without this change?
    jagdeep sidhu committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    4da0876 View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. print -> logger, remove return [] (unreachable) and use "assistant" r…

    …ole for end state msgs
    jagdeep sidhu committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9c8cac5 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'microsoft:main' into main

    jagdeep sidhu committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    65c6292 View commit details
    Browse the repository at this point in the history
  3. add api reference to hardcoded user role

    jagdeep sidhu committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    ad0216b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b1d11ad View commit details
    Browse the repository at this point in the history
  5. nits

    logging level based on errors/cancellations.
    
    Remove extra message on failure. Remove last error message on success.
    
    only show last error casted to string in content for last error
    jagdeep sidhu committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    975bf0e View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. revert role change (locally tested, seems to work for now)

    jagdeep sidhu committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    b89bbe2 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. clean up run loop

    1) remove is_termination_msg
    2) add external run cancellation
    3) remove _wait_for_run and internalize through _get_run_response
    4) process responses through _process_messages
    jagdeep sidhu committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    88a6343 View commit details
    Browse the repository at this point in the history
  2. remove unused imports

    jagdeep sidhu committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    7ae462d View commit details
    Browse the repository at this point in the history