Manta Developers
GitHub
Menu

@manta-eu/react/components/embedded-chat

Reference for @manta-eu/react/components/embedded-chat as it is on main.

Type Aliases

AppGuide

AppGuide = object

Properties

pages

pages: AppGuidePage[]

terms

terms: AppGuideTerm[]


AppGuidePage

AppGuidePage = object

One page of a custom app, so the agent can tell a user what the page does and how to get to it.

Properties

description

description: string

One or two sentences: what the user can do on the page.

edits?

optional edits?: IRI[]

The properties that the user can change on the page.

optional navPath?: string[]

The menu labels to click, such as [“Work”, “Campaigns”].

path

path: string

A URI template, such as “/b/{brand}/campaigns”.

shows?

optional shows?: IRI[]

The classes and properties that the page shows.

title

title: string


AppGuideTerm

AppGuideTerm = object

One glossary entry with the single definition the agent gives every time.

Properties

definition

definition: string

iri?

optional iri?: IRI

The knowledge graph term, if one exists.

term

term: string


AppTool

AppTool<Input, Output> = Required<Pick<AITool<Input, Output>, "description" | "parameters">> & object

A tool the host app lends the agent. It runs in the browser, with the app’s own access.

Type Parameters

Input

Input = never

Output

Output = unknown

Type Declaration

execute

execute: (input) => Output | Promise<Output>

Parameters
input

Input

Returns

Output | Promise<Output>


AppTools

AppTools = Record<string, AppTool<any>>

Functions

appGuideTools()

appGuideTools(guide): AppTools

Lends the agent the app’s guide, so it can say where a page is, what it does, and what a term means.

Parameters

guide

AppGuide

Returns

AppTools


EmbeddedChat()

EmbeddedChat(props): Element

Parameters

props

AuthenticatedChatProps

Returns

Element

References

ChatDraft

Re-exports ChatDraft


ChatStartupReport

Re-exports ChatStartupReport