Skip to content

Fix error in return variable documentation#2267

Merged
gunthercox merged 1 commit intogunthercox:masterfrom
martin-martin:patch-1
Jan 5, 2025
Merged

Fix error in return variable documentation#2267
gunthercox merged 1 commit intogunthercox:masterfrom
martin-martin:patch-1

Conversation

@martin-martin
Copy link
Contributor

If .process() in your custom Logic Adapter returns a tuple with (confidence, return_statement), like currently described in the docs, then running the bot gives an error:

AttributeError: 'tuple' object has no attribute 'text' chatterbot

This was addressed also in #1208 and it's probably worth to update the docs to reflect that .confidence is an attribute on a Statement().

If `.process()` in your custom Logic Adapter returns a tuple with `(confidence, return_statement)`, like currently described in the docs, then running the bot gives an error:

```
AttributeError: 'tuple' object has no attribute 'text' chatterbot
```

This was addressed also in gunthercox#1208 and it's probably worth to update the docs to reflect that `.confidence` is an attribute on a `Statement()`.
Copy link
Owner

@gunthercox gunthercox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for updating this

@gunthercox gunthercox merged commit 2638e42 into gunthercox:master Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants