https://discord.gg/botpress logo
Dynamic database not working
# 🤝help
h
I'm struggling to see what is going wrong with my dynamic database, i have three KB values passed through the API, where it is then turned into a workflow variable, and then that variable is in the kb field "apiList": "kb_default; kb_01K9Q2JBMHKGSDQNX6WAVCNKX5; kb_01K63H3H3CFANAWKWY3DA4GYP2" this is the correct format for it no, with them separated with ";"? the only way i got it from the API to the workflow was with this code that uses an intermediary const apiList = event.payload.apiList // Get the API version from the incoming event workflow.kbList = apiList // Assign the API version to workflow.editorVersion https://cdn.discordapp.com/attachments/1466100915995021493/1466100916351664199/image.png?ex=697b8461&is=697a32e1&hm=7b77e5d1f82df7d3ea71114b45567823433c7b17f57b75eb9a474146aefe6949& https://cdn.discordapp.com/attachments/1466100915995021493/1466100916909244478/image.png?ex=697b8461&is=697a32e1&hm=c5e3609ef058badea0ea8f39780bbb73ba6e3dc22f804e16d2a03fcfee579c59&
w
do you think maybe it could be the variable type?
maybe your workflow.kbList is a string and it should be something else
like an object
h
i got it working months ago with a string which is why im confused
w
that type of thing happens a lot, which probably means you were doing it in a way that's wrong
and you were lucky that it was working
and now something was changed that requires it to be done in a specific way
how did you get your kb ids? i'm gonna test this out
urls
too
thanks for the help @wide-umbrella-5226 🫶
w
@high-room-45079 i can't replicate - working fine on my end
can you print out the content of your kb variable and send me a screenshot?
also weird that you're getting an issue - when my search wasn't working, the bot just replied "i have no KB ids"
there might be a syntax error somewhere
ended up using a third secret method LOL
h
"kb_default; kb_01K9Q2JBMHKGSDQNX6WAVCNKX5; kb_01K63H3H3CFANAWKWY3DA4GYP2"
that is the value of my variable
w
can you try with just the default kb
and remove the other ones
because what you're getting is an ERROR, not even the bot saying it can't find it
which could mean an error in the code somewhere
just kb_default there
i have a text node that outputs the string value
w
now try adding a second kb
see how this time it didn't error out
w
now add the third one
w
well now it doesn't crash at least
can you inspect the answer and see if it's actually searching the kbs?
h
i think thats more related to how i just set this up. the API calls are normally coming from my company ERP software, for this purpose i plugged it into the top of the equation manually https://cdn.discordapp.com/attachments/1466100915995021493/1466115416677023805/image.png?ex=697b91e2&is=697a4062&hm=0cc5fa2254361fe05d1d05bfb553b215b4d99ef72fee24642363168b94e89c3d&
w
there's a chance botpress makes a type conversion in the backend automatically when you create the variable there
you can try creating an array
workflow.kbList = ['kb_default', 'kb_01K9Q2JBMHKGSDQNX6WAVCNKX5', 'kb_01K63H3H3CFANAWKWY3DA4GYP2']
or you can try passing the list directly into your workflow variable
workflow.kbList = "kb_default; kb_01K9Q2JBMHKGSDQNX6WAVCNKX5; kb_01K63H3H3CFANAWKWY3DA4GYP2"
-# do not trust me on this i'm not a programmer
h
alas no change for this one
i am bamboozled to say the least
w
lol wat
maybe it's your kb model?
or your response model
in your autonomous node
maybe it`s too stupid
w
i don't know, the no kbs enabled could be a result of the llm
you can try doing this another way
you can try giving the AN access to all kbs and then passing the kb ids you want to the autonomous agent itself
in the prompt, not the kb node
and then instruct the search specifically using those ids
h
@loud-crowd-60573
l
Will ask and get back
Can you share your workspace ID @high-room-45079
h
wkspace_01K0Y9HSVFNMYBW1WYRH4J67JB
l
I see you are plus plan Sam I urge you to ask the solution engineers for this matter as a solution would be found much quicker (headset icon on dashboard) https://cdn.discordapp.com/attachments/1466100915995021493/1466144730915274834/image.png?ex=697bad2f&is=697a5baf&hm=952c9d6c2ac0fd7fc8ddaa5d097dc9868a06fc80b0e6a8b2d68d39e5b50946da&
By the way were you getting poor results when searching the KBS with the standard Search KB Card?
h
ive been waiting for a while lmao
let me go bump them now
h
no it was working fine when standard
l
Then why the change - if you don't mind me asking?
h
we need the dynamic database to ensure separation of client data in the future
l
Ah theyre in a big meeting -- will go see them directly ASAP.
When the meeting concludes.
Understood thanks for sharing!
h
my work day is just ending lmao
l
Was there any reply at all so far?
our solution engineers work on EST / PST time zones usually 9 am to 10 pm EST
Your ticket is in the system and they will get to it! I was created during everyones lunch hour -- a little time zone confilction haha.
h
lmao okay perfect
2 Views