Is there a DVM that connects me to an AI via Nostr chat sessions?

Reply to this note

Please Login to reply.

Discussion

You mean a chat bot?

Yeah. I am wondering how to have a conversation with an AI inside of Amethyst. We could do it via NIP-17 DMs (the AI is a pubkey that replies to regular DMs), or via DVM request/responses or maybe something like a Nostr AI Connect with it's own little protocol to choose and connect to a provider.

https://github.com/believethehype/nostrdvm/blob/main/tests/chat_bot.py

This works with nip17, I think the backend code is inaccessible rn, but if you replace this part with any LLM, it should work.

And also via DVM with kind 5050

Should we choose just one way of doing it as the default way of integrating any Nostr client with AI?

Or are they different enough that we will need both of them for different clients?

Not sure. Another issue is streaming text via events. Not too great rn.

This being said, not sure if communication via nostr with llms is fast enough. Not sure if we have something to deal with this.

How does the AI manage the session context. Does it reset in every message as a new session or does it know the short past?

Depends how much history you hand over. In principle, most models can handle the conversation history as context (depending on the length they can deal with). You either can forward the history or you do one request at a time. depends on what you want

Well, as a user of AI, I constantly need to start fresh. So, there must be some button somewhere to reset the context.

I often tell the conversation to give me a prompt that will allow me to start fresh based on β€œwhere we are and leave behind the conversation portions that have been abandoned.” Sometimes this works. 🀞

I use simple commands to my bot like

/new (fresh session)

/session (list sessions)

Etc.

I think we need some kind of meta text that clients could render as a menu bar, for talking to bots

The second resolution of `created_at` is a real problem imo. It should have been nano or at least microseconds.

Clients display conversations out of order when they occur in sub-second intervals, which is often with bots that respond fast.

With higher time resolution we could also have a short lived kind for streaming text. And ephemeral status messages for things like "Alice is typing"

the benefit of nip17 is, the relay list, and you could set disappearing by the dvm just not sending itself a copy..

er, the nip17dvm 😁

How does it manage the session? Or does it clear the session in every message?

There isn't? O_o

aight thought that'd be like the #1 used one. xD Damn.

Perhaps there is a DM bot ?

I think someone made a POC on replit, where he connects his client to ChatGPT and allows the AI to do work via notes

https://www.youtube.com/watch?v=dAuLnNxU0Yg

What’s a β€œNostr chat sessions”?

A chat interface based on NIP-17 DMs, NIP-28 public chat groups, NIP-29 relay-based groups or NIP-53 live streams.

I want this too