👋 Hello, I'm trying to build a simple JS client to interact with an existing Dust assistant. I was looking at the SDK https://github.com/dust-tt/dust/tree/main/sdks/js I looked at the labs, but I haven't found any practical example here. Is there any resource available in that area ? Also, some documentation about the SDK would be amazing 😄 Thanks
Thanks Benoit Molenda for the question ! I am curious, what are you looking into building? 👀 The documentation is coming. We decided to have an early release for the community. 🎁 I think Sébastien Flory will be able to help if you have a concrete question in mind. Otherwise, if I remember correctly, the code for the Chrome extension is public. Would a pointer help?
Hello Benoit Molenda ! We are definitely lacking some doc regarding the dust js client.. we will be working on it asap.
If you are using a workspace api key, it's relatively straightforward.
const client = new DustAPI(
{url: 'https://dust.tt', nodeEnv: 'production'},
{apiKey: 'your-workspace-api-key', workspaceId: 'your-workspace-id'}, console);
I try to POC a simple UI to allow clients to call assistants from within our Admin Space 😉
I'll look at the Chrome extension code, thanks
(i notice that i need to clean up that nodeEnv to make it optional)
lmk if I can help you debug some code
The runApp (i'm not sure if that's the function I'm supposed to run) is asking for a lot of params. I've got the workspaceId and the appId (I guess that's the AssistantID). I don't know/see what are
appHash
appSpaceId
config (that should be a DustAppConfigType)
are you sure you want to runApp ?
runApp is mean to run a specific Dust App. If you want to talk with one of your assistant, you want to create a conversation.
hey Sébastien Flory! would you eventually have 30 minutes this morning so we can explain what we try to achieve and you can advise what would be the best option? thanks a lot for your help on this!
Hello, yes I can do that 🙂
thanks a lot! what time do you prefer?
anytime works for me
same
ok I'll send an invite for now:) thanks a lot!
we are already all in the call so feel free to join whenever you want Sébastien Flory 🙂
finding a room and coming
Hello Sébastien Flory We have our prototype working 😄 🥳 However, I notice that I never give to the system the ID of the assistant, only the workspace ID. But If I understand well, many assistant are contained in a given workspace. I have this in my code base:
const DUST_AGENT = { // AgentType
sId: "dust",
name: "Dust",
description: "An assistant with context on your company data.",
}
That I don't fully understand. I'm using it this way:
const r = await api.createConversation({
title: null,
visibility: "unlisted",
message: {
content: question,
mentions: [
{
configurationId: DUST_AGENT.sId,
},
],
context: CONVERSATION_CONTEXT,
},
})
My guess is : It's or the DUST_AGEN.sID or something in the context that point at the assistant, right ?
The assistant is defined by the mentions array (btw you can ask the same question to many assistants at the same time).
The context is about metadata of your user / conversation (location, time etc..)
Hello Sébastien Flory, we did our presentation today. We managed to present something working thanks to your help and the SDK 🙏
You're welcome 🙂
That's awesome ! Don't hesitate to share screenshot / clips in 🔒[private feed], I think it could really help inspire others💡and maybe help you find others working on something similar.