Message Attachment
This represents an attachment to a message. An attachment points to remote content by url (or pageUrl), or references a repository by repositoryId.
Example use of message attachment
import ProteusAI from '@proteus-ai/sdk';
const proteus = new ProteusAI({ apiKey: 'user-3a4d80a9c3cca7ffd1bc341f...' });
await proteus.connect();
const chat = await proteus.chats.create({
participants: [{ id: '659a21168ad10b77542a3587', type: 'AGENT' }],
});
await proteus.chats.join(chat.id);
const { message } = await proteus.chats.send(chat.id, {
content: 'Describe this image',
type: 'TEXT',
attachments: [{ url: 'https://fastly.picsum.photos/id/337/200/300.jpg' }],
});Properties
url string optional
A URL pointing to the attached content (e.g. an image or file).
pageUrl string optional
A URL pointing to a single page of the attached content.
repositoryId string optional
The ID of a repository to attach.