chat

Chat with Nebula.

Example

import { Nebula } from "thirdweb/ai";
const response = await Nebula.chat({
client: TEST_CLIENT,
prompt:
"What's the symbol of this contract: 0xe2cb0eb5147b42095c2FfA6F7ec953bb0bE347D8",
context: {
chains: [sepolia],
},
});
function chat(input: Input): Promise<Output>;

Parameters

The input for the chat.

Type

let input: {
account?: Account;
client: ThirdwebClient;
context?: {
chains?: Array<Chain>;
contractAddresses?: Array<string>;
walletAddresses?: Array<string>;
};
prompt: string | Array<string>;
sessionId?: string;
};

Returns

let returnType: {
message: string;
sessionId: string;
transactions: Array<PreparedTransaction>;
};

The chat response.