Comments (4)
Hey @keiffster I tried to debug the python code. You are trying to get the recent input in the conversation for <response>
tag. But the recent input is not the response it is the request. So instead of bots answer it tried to get the response from user question. So it returned the empty string.
I have changed the value of the integer nth_question
to self.index+1
. Now it is returning the correct answer for the <response>
tag.
from program-y.
Do you want to submit a pull request and I'll add the fix, or just send me the code and I'll patch it manually ?
is not a tag I regularly use, ( if at all ), so maybe not tested as well as it could be
K
from program-y.
In the response.py
file under TemplateResponseNode
class, I've changed the code in resolve
function. This is the original code.
def resolve(self, bot, clientid):
try:
nth_question = self.index
conversation = bot.get_conversation(clientid)
question = conversation.nth_question(nth_question)
responses = question.combine_answers()
resolved = responses
except Exception as excep:
logging.exception(excep)
resolved = ""
logging.debug("[%s] resolved to [%s]", self.to_string(), resolved)
return resolved
Here I have changed the value of nth_question
to self.index+1
from program-y.
Fix added and uploaded to master, I've also marked the fix with your username so that you get a credit
Have a look at how to create a pull request. If you are actively testing or developing the code, then pull requests are a great way to contribute. They won't get added to the code until I review and approve them so you'll never break anything, and you'll get the credit for your contributions
K
from program-y.
Related Issues (20)
- Programy on PythonAnywhere HOT 1
- Program-Y is alive.... again HOT 2
- <system> tag in aiml doesn't work HOT 1
- scheduling extension doesn't print message
- Error when trying to save data from 'learnf' elements to MongoDB HOT 2
- Wikipedia doesn't seam to work HOT 1
- <learn> and <star> don't work together HOT 1
- How to get a variable value outside of aiml files inside python code?
- Setting SentenceSplitter on an embedded bot HOT 4
- Whenever I install program y, cryptography fails to install and the whole installation stops.
- Bug in pattern parser where the star index of the words will change
- WARNING:root:[Console] [bot] [brain] [testuser] - System command node disabled in config
- ModuleNotFoundError: No module named 'sqlalchemy'
- Pattern matching not work in a right way
- image not displaying in telegram
- GUI for my bot (Not a feature request I was just unsure where to ask) HOT 1
- Change Default Response
- AttributeError: module 'collections' has no attribute 'MutableSet' HOT 3
- module apscheduler not found
- Thoughts about ChatGPT service for ProgramY
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from program-y.