@palico-ai/client-js is a Javascript library that helps you communicate with your Palico application. This library should primarily be used in secured server-side environments, such as a NodeJS server or a NextJS server runtime.
Setup and Installation
To install the Palico Client SDK on your NodeJS project, run the following command:Create a Palico Client
1
Generate a Service Key
You can generate a service key from your Palico App project directory
- Local Instance
- Production Instance
2
Create a Palico Client
Calling an Agent
Here’s an example of how you can call an agent using the Palico Client SDK:chat method here.
Stream Response
You can also stream the response from the agent. Here’s an example of how you can stream the response from the agent:API Reference
chat()
Input
The
chat method accepts the following parameters:App Config value to send to your agent. Learn more about App Config.
Output (Non-Streaming)
The
chat method returns a promise that resolves to a ChatResponse object: