Via SDK
Interact with Nesa Chain via the official SDK
Last updated
Interact with Nesa Chain via the official SDK
Last updated
Nesa provides a developer-friendly Node.js SDK for executing inference requests in both client and server environments.
In this section, we cover high-level SDK usage information; on the other hand, detailed documentation can be found in .
Interactions with a specific kernel are performed via a instance. To create an instance, pass your desired configuration parameters, such as modelName
, lockAmount
, and chainInfo
, to the constructor.
Establishing a session confirms your unes lockup via a blockchain transaction. Complete this process with a call to the ChatClient
instance's requestSession
method.
This process takes place over a websocket connection for speedy, two-way interaction.
Begin your single- or multiple-message interaction with the configured kernel by using the ChatClient
instance's requestChat
method, passing it input via the messages
field.
text-generation
text-classification
token-classification
translation
summarization
sentiment-analysis
[
{
"content": "<query>",
"role": "user"
}
]
question-answering
[
{
"input": "<query>",
"context": "<context>",
"role": "user"
}
]
object-detection
image-segmentation
depth-estimation
image-classification
feature-extractor
[
{
"input": "<image_ipfs_cid>",
"role": "user"
}
]
We’re excited to have you explore Nesa via SDK. Enjoy a seamless and intuitive experience as you interact with the network!
Getting Started: If you’re new to Nesa, check out the guide.
Via Web: Utilize Nesa Chain AI Kernels using the Web. .
Via IBC: Connect with other blockchains using the Inter-Blockchain Communication protocol. .
Via Nesa CCI: Use the Nesa Command-Line Interface for advanced operations and automation. .