Skip to content

Error when submitting a prompt to chatgpt  #108

@DeianGG

Description

@DeianGG

I run the app using this code
library(chattr)
Sys.setenv("OPENAI_API_KEY" = "sk-........fV3D")
chattr_use("gpt4")
chattr_app()

and whenever I submit a prompt from the Viewer window on the right side i get this error
image

Listening on http://127.0.0.1:4438 Error: ! in callr subprocess. Caused by error in _**`abort(req_result)`: ! `message` must be a character vector, not a object.**_ --- Subprocess backtrace: 1. chattr::ch_submit(defaults = defaults, prompt = prompt, stream = stream, … 2. chattr:::ch_submit.ch_openai(defaults = defaults, prompt = prompt, stream = stream, … 3. chattr:::ch_openai_complete(prompt = prompt, defaults = defaults) 4. rlang::abort(req_result) 5. rlang:::validate_signal_args(message, class, call, .subclass, "abort") 6. rlang:::check_character(message, call = env) 7. rlang:::stop_input_type(x, "a character vector", ..., allow_na = FALSE, … 8. rlang::abort(message, ..., call = call, arg = arg) 9. \| rlang:::signal_abort(cnd, .file) 10. \| base::signalCondition(cnd) 11. global (function (e) … Warning: Error in observe: Streaming returned error 51: 50: signalCondition 49: signal_abort 48: abort 47: observe 46: 3: shiny::runApp 2: runGadget 1: chattr_app --   > | > >

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions