logoassistant-ui
Reference

<AssistantRuntimeProvider />

The TextContentPartProvider provides data and APIs for TextContentPart components.

This is useful if you want to reuse the same Text component outside of a message text, e.g. with the @assistant-ui/react-markdown package.

import { AssistantRuntimeProvider } from "@assistant-ui/react";
 
const MyApp = () => {
  const runtime = useEdgeRuntime({ api: "/api/chat" });
 
  return (
    <TextContentPartProvider text={"Hello!"}>
      <MyMarkdownText />
    </AssistantRuntimeProvider>
  );
};

Properties

AssistantRuntimeProvider

runtime:

AssistantRuntime

The runtime to provide to the rest of your app.

children?:

React.ReactNode

On this page

Edit on Github