New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@yext/chat-core

Package Overview
Dependencies
Maintainers
0
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yext/chat-core

Typescript Networking Library for the Yext Chat API

  • 0.9.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
426
decreased by-12.16%
Maintainers
0
Weekly downloads
 
Created
Source

chat-core

a networking library for interacting with the Yext Chat API

  • Works in both the browser and Node.js
  • 100% TypeScript, with detailed request and response models
  • Compatible with both CommonJS and ES6 imports

Usage

import { provideChatCore, StreamEventName, Message } from "@yext/chat-core";

const chatCore = provideChatCore({
  botId: "YOUR_BOT_ID",
  apiKey: "YOUR_API_KEY",
});

const messages: Message[] = [
  {
    source: "USER",
    text: "What is Yext Chat?",
    timestamp: "2023-05-15T17:33:38.373Z",
  },
];

// Chat API
response = await chatCore.getNextMessage({ messages });

// Chat Streaming API
stream = await chatCore.streamNextMessage({ messages });
stream.addEventListener(StreamEventName.TokenStreamEvent, (event) =>
  console.log("data", event.data)
);
stream.consume();

Documentation

See our documentation for a more details on supported API calls and interfaces.

Keywords

FAQs

Package last updated on 10 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc