1.0.6 • Published 2 years ago
hyperaide v1.0.6
Hyperaide SDK Documentation
Overview
The Hyperaide SDK offers a convenient interface to integrate with the Hyperaide platform.
Getting Started
Installation
To install the SDK:
npm install hyperaideOr if you're using Yarn:
yarn add hyperaideInitialization
Begin by initializing the SDK:
import Hyperaide from 'hyperaide';
const hyperaide = new Hyperaide({ apiKey: 'YOUR_API_KEY' });Usage
Prompts
To get a response:
const response = await hyperaide.response({
promptId: "YOUR_PROMPT_ID",
returnPromptOnly: true
});To send feedback:
const feedbackData = await hyperaide.feedback({
responseId: "YOUR_RESPONSE_ID",
vote: "up",
message: "Feedback message"
});Vectors
Manage vectors with these methods:
1. Add a vector
const newVector = await hyperaide.vectors.add({
vectorBoxId: "YOUR_VECTOR_BOX_ID",
text: "YOUR_VECTOR_TEXT"
});2. Update a vector
const updatedVector = await hyperaide.vectors.update({
vectorBoxId: "YOUR_VECTOR_BOX_ID",
vectorId: "YOUR_VECTOR_ID",
text: "NEW_VECTOR_TEXT"
});3. Delete a vector
await hyperaide.vectors.delete({
vectorBoxId: "YOUR_VECTOR_BOX_ID",
vectorId: "YOUR_VECTOR_ID"
});4. Retrieve vector details
const vectorInfo = await hyperaide.vectors.retrieve({
vectorBoxId: "YOUR_VECTOR_BOX_ID",
vectorId: "YOUR_VECTOR_ID"
});5. Search for vectors
const searchResults = await hyperaide.vectors.search({
vectorBoxId: "YOUR_VECTOR_BOX_ID",
query: "SEARCH_QUERY"
});Conclusion
The Hyperaide SDK simplifies the integration process with the Hyperaide platform. For further details or support, please refer to the official documentation or reach out to our support team.