You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first is that all the examples contain the line:
assistant_id = '{environment_id}' # replace with environment ID
Here although the variable name is assistant_id the comment and assignment value both say environment. Here assistant ID would be correct and the line should read:
assistant_id = '{assistant_id}' # replace with assistant ID
The second error is found in examples 2 and 3. These contain this section:
result = assistant.message_stateless(
assistant_id,
input = message_input,
context=context
).get_result()
the function assistant.message_stateless() requires the positional argument environment_id. The solution to this is to add the line
environment_id = '{environment_id}' # replace with environment ID
next to the assistant ID line from earlier on. Then the section of code in examples 2 and 3 should be changed to read:
result = assistant.message_stateless(
environment_id = environment_id,
assistant_id = assistant_id,
input = message_input,
context = context
).get_result()
The final issue I have found is that the section:
Initialize with empty message to start the conversation.
message_input = {
'message_type:': 'text',
'text': ''
}
context = {}
is repeated in example 3.
Anything else?
No response
The text was updated successfully, but these errors were encountered:
Which topic are you reporting about?
https://cloud.ibm.com/docs/watson-assistant?topic=watson-assistant-api-client&code=python#api-client-v1-api
What do you think needs to be updated?
The first is that all the examples contain the line:
assistant_id = '{environment_id}' # replace with environment ID
Here although the variable name is assistant_id the comment and assignment value both say environment. Here assistant ID would be correct and the line should read:
assistant_id = '{assistant_id}' # replace with assistant ID
The second error is found in examples 2 and 3. These contain this section:
result = assistant.message_stateless(
assistant_id,
input = message_input,
context=context
).get_result()
the function assistant.message_stateless() requires the positional argument environment_id. The solution to this is to add the line
environment_id = '{environment_id}' # replace with environment ID
next to the assistant ID line from earlier on. Then the section of code in examples 2 and 3 should be changed to read:
result = assistant.message_stateless(
environment_id = environment_id,
assistant_id = assistant_id,
input = message_input,
context = context
).get_result()
The final issue I have found is that the section:
Initialize with empty message to start the conversation.
message_input = {
'message_type:': 'text',
'text': ''
}
context = {}
is repeated in example 3.
Anything else?
No response
The text was updated successfully, but these errors were encountered: