ibm-cloud-docs / assistant

22 stars 58 forks source link

The first script throws a 422 exception. Is the Python code still correct? #406

Closed ahnugent closed 3 years ago

ahnugent commented 3 years ago

When I try to run the 1st example ("connects to the service, sends a single message, and prints the output to the console") I get an exception that mentions "Code: 422" (had to look it up -- never seen it before!)

I'm wondering if there needs to be a None after assistant_id, or just no comma:

response = assistant.message_stateless(
    assistant_id,
).get_result()

(This is the only thing I can think of.)

ahnugent commented 3 years ago

I've tried a few things, now, including passing input = {'message_type': 'text', 'text': 'Hello'} as the second argument, but I can't get past the 422 error. It doesn't look like a documentation issue to me, now.