Hi,
I’m trying to get some preprocessing done to the user message. I have built a custom component and added in my config right before the Tokenizer and after SpacyNLP. I need to do some processing on the user message that I get from the message object like so message.get(SPACY_DOCS[attribute])
using TEXT
as the attribute
.
After doing some processing on this I was to place the updated message back into it. I tried message.set(SPACY_DOCS[TEXT], fixed_doc)
but I keep getting TypeError on the argument. Can someone please guide me on how can I go about this, what type should be the argument and how do I make sure that it is that type when I pass it? It is currently a string.
The flow:
- get doc
- do some processing on the message (a string)
- place this string back in the message as the updated user message
An urgent help on this will be appreciated please.