diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js
index ea5da59..a59dca3 100644
--- a/docs/assets/navigation.js
+++ b/docs/assets/navigation.js
@@ -1 +1 @@
-window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42V0UrDMBSG36XXw6HokF06Nyg4ESfeiBchO65xaVKaU5yI725sZ9bYniS3+f7/4+SkYy9fGcIBs3l2x9SuYTsw2SSrGBb2CFRTmqkDZwWW0tK9UNtsfv09cd213oIcFLtTuvUIlWQc1oCF3g7aPg1YtBzO3B7SnYUUoPBU4pIZA2banfu984t+My/tJlZCwrDsULR/D/ih6z2hONKQ5YYZmF0uFbcbrk8aoRDqN7s0M/USvuriatZfRcFw1PALYsVFoQUHst7hmCRXVUOP0NKYYg3G2M2RkiOPaTabJamwLKEeWYhLJKhuQSILmdpATPQsjNCK1HQ4TRK5Wz+UJoy9mpcKKnVZSUDyog6nSUIX/RcKCZd1rcd/nC0JVVeMY8OkwM/R/gmnSRYF8H3E1GZCuly9Ayd37GiSgh7Ij4Rkx/+Hh3zU42iSgp7Hj4RkT/ogOPVifzBFQA/jJYKqmikjGY5/xI6mKKgH7/Gh5vUHH+T1h1cIAAA="
\ No newline at end of file
+window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE42VXUvDMBSG/0uvh8OhQ3bp3KDgRJx4I17E9LjGpUlpTnEi/ndrO7PG9iS5zfO+D8lJP56/EoQDJovklqldzXZgkklSMsybJVB1YaYWnOVYyIbuhcqSxdX3xHY3OgM5KHardOsBSsk4bABznQ3aLvVYtBzuuV2kO0spQOGpxCUzBsy0W3d757N+My2aSayFhGHZomD/DvBDV3tCcaQ+yzUzML9YKd5MuDpphEKo3pqhmamTcFWzy3l/FDnDUcMvCBWXuRYcyHqHQ5JUlTW9hZaGFBswppkcKTnykGa7XZGKhkXUAwOxiQjVDUhkPlMbCImehBFakZoOx0kCZ+uH4oShW3NSXqUuSglIHtTiOInvoP9CPuGqeIUsE2o3arI0SnHDiGfBSUSp6NfNjXhlVaXHvzst8VXXjGPNpMDP0f4Jx0mWOfB9wNRmfLpUvQMnHx9LoxT0htyIT3b89d2nox5LoxT0ftyIT/aoD4JTN/YHYwT0ZpyEV1UxZSTD8ffT0hgFdeE9PtS8/AClLQRsMgkAAA=="
\ No newline at end of file
diff --git a/docs/assets/search.js b/docs/assets/search.js
index 8f8b83b..4a82639 100644
--- a/docs/assets/search.js
+++ b/docs/assets/search.js
@@ -1 +1 @@
-window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE61dXZPbtpL9LzOvcx0C/M7bOk5uvDdOpeJ7s7Xlcrk4GnqGGUnUktI4Tir/fQmCIButboDCzINdGrHRB8BpNIBDivjrqmu/9Ffffvjr6rHZ3119K2Rxc7WvdvXVt1ffbZt6f7y6uTp12+HPzbbq+7r/Rn/96uG42w7Xpm+H61d/3xgvqZCzl02774/daXNsO5era9sOuL25OlSdqshcowVIRDKZkZRvF4K+vng+9nf/aPp/HLrmqTrW63GqQ/Ov+qsTajYJQpNRAlh4qJwcXE8GK3vszPf799973WubUITfmr5p916Q2SwIp90dtvXRiwPNQnB+qDbHU7Vtjm7+LbMQnB/rant8+O6h3jw6gWy7EKS3+9/rjbfjoFUIyq/1YVtt6l/eOlGgVQjKv9s/mo2PG2AUhNFV+36rh7ADBFgF9Vf15U37z9o98oERkWfa48BYfXch5i9tvwJ0snox1CHBrANeDEOx02yG/r7rwKTU7I9193kIv/6b8YJzhrMmhNrv59rY0MGga7K4X7rnXXtXb/vZeb0/7fpv9JfuCmYgl3S7upe/dO1P22pXxcVr3t01aUxXeqoaiflze+q1q9GNFLELlLa+HHWp/LtmWExU23xdU6H15ahDnZ8qkeavf/zBgWZbBfRofRqqqCZKZ6OQ2eU4/9vEyWtr0XEOAm0uR3hT14e+rh+/G2y6LH/9dlr4OQAdRVbig4TTbms8oMbv1o6n/+r7IV6qPa7w4uQamtAV1LUg/f+nrzve9XT1Yq/vv/bHesf7na+v83w2tb+rjw/t3VnHWhfX9vCv1f6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8jebHtq6qMyspdE6hemoLJchvoybA5Qv8JZIOJS8NcmTm7xgwvw7jndxo83V4fmUG+b/WD04ePff/8/rfJ4PVeqAAA=";
\ No newline at end of file
+window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAE61dXXPjtpL9L/ar70QAv+dtJx83szeTSiX3ZmtramqKtjA2x5KoJalxJqn89wVIgmy0ugGK9oOrZKmB0+jTaACHFPXXVVM/tVev3/919Vgdtlevhcxvrg7lXl29vvp2V6lDd3VzdWp2+t+7Xdm2qv1mePvVQ7ff6c/Gd/XnV3/f2F4SIade7upD2zWnu65ufF1du3ag25urY9kYRyaPZiCxkfGEZPr2IQyfzz137fYfVfuPY1N9KTu1HKc8Vv9SX71Qk8kqNLmJAQsPpZeD69FgYcTO+v7tt++D3Q82axF+r9qqPgRBJrNVOPX+uFNdEAearcH5fn+rttvqcO+FgVZrUH4o77pTuas6f5Y5ZmtwflTlrnv49kHdPXqBXLs1SG8Pn9VdkB5otQblV3XclXfql7deFGi1BuXf9R/VXYgbYLQKoykP7W4oFB4QYLUqXuXTd/U/lb++ACOimtWdZkxtL8T8pW4XgI5WL4aqy9gy4NlwLXaSziWjacDSVx061XzS6dd+03/gXUedZUeF+7m2NnQyDJ7M3c/heVdv1a6dOleH0779ZnjT7+A8zDdNtb1XXf2kmp/K5l697fbvdvu33R3f67WvDT2E0VHSgx9Vs1et/KWpf9qV+zLK33igSePLMX+uT+3QVd+NFJEPlLZ+zkjfVXrTVO6yZUOF1pejap+/lCLJ3vz4gwfNtVoRUXXSLpoNgXdQyOxynP+toviNs7k6B4E2lyN8p9SxVerxW23TpNmbt+MG1wPoabIQH5S8eqfwlO7fWzqj/6ttdb6UB+zw3Mk1NKEdHLwg+/9Pqxq+6/HTi3v97WvbqT3f7/T5sp7PNhfvVPdQb88C63y4NMK/lodtfebreVfXkyHjtOsaifVD+agWII1m63G+1duR+7r5ugALmK7He1e2jwuwRrMLcWb2fyoP96fy/mxGTe8vnlWfmuqxPBz8HV1D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H9CBaMABbHgJqDzMHKYaFCZLLjwNHqnWjvVDSrkrG7TlE/b+l65zEBiuPLWNzzWrdsSSiXcfOpbtq06a+xsTrnGw9Np96p7qLfuygwmBJuGY/Nj5c4JOCVsbnMMT10QmzRYTjbs+Gu0s3bwrcAqxFRwfR05IYBSHVt5dSU722IUoCgU3MrbnFo8kwrgecHFvC33NWoGMrPgMvP8Oi28CC/y3BJlX0guZ1rV3GLHwZwquBRv9Z5K722c418BkpSdi+2u/lI6qVGAzGB376bZ2Z0HBZhSBTvC45naXIBcKLhcsE8BhckItRk5rfX2RWrTM5vWh0nYK+z6YF8I+4K9SNg+lQ+Vu6AX0AH2qNQ+qS0asfmeMWjJldn2a9spt1CCvGIP0125r9zt0Qam44Ztp3Z6PXAbwvm+4abNmWoGL5OL1GoG7Hm0eyjdKreB27kNN+266cHREBqeBex046ixPRD1EV6BYNeHbn6yLGwLL9XatOI4Zm/TgAXSXgmT7MUQ98GdcIF0Nl9s81PzeJajcBwbrvKcHpuywpXAfOEctOXCd2q2KN3gorzhSkj/+EuwlIABjmFi73s6te59Q/DoyFL0pVKdMXI3SuY77cBZrm496bMDiivcPLC78a9VFN/iO0ng7Qz0GvLh5upYHdWuOmij9x/+/vv/Ac3bODJytQAA";
\ No newline at end of file
diff --git a/docs/classes/Client.html b/docs/classes/Client.html
index dd41e23..5fda044 100644
--- a/docs/classes/Client.html
+++ b/docs/classes/Client.html
@@ -6,6 +6,7 @@
ChatSSE
Chat
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Chat() {
const model = pg.chat.Model.NeuralChat7B;
const input = [
{
role: pg.Roles.User,
content: 'How do you feel about the world in general',
},
];
const maxTokens = 1000;
const temperature = 1.1;
var [result, err] = await client.Chat(model, input, maxTokens, temperature);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.model + ': ' + result.choices[0].message.content);
}
Chat();
@@ -46,7 +47,7 @@
onMessage represents a function that will receive the stream of chat results.
import * as pg from '../dist/index.js';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function ChatSSE() {
const model = pg.Models.NeuralChat7B;
const input = [
{
role: pg.Roles.User,
content: 'How do you feel about the world in general',
},
];
const maxTokens = 1000;
const temperature = 1.1;
const onMessage = function (event, err) {
if (err != null) {
if (err.error == 'EOF') {
return;
}
console.log(err);
}
for (const choice of event.choices) {
if (choice.delta.hasOwnProperty('content')) {
process.stdout.write(choice.delta.content);
}
}
};
var err = await client.ChatSSE(model, input, maxTokens, temperature, onMessage);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
}
ChatSSE();
@@ -63,7 +64,7 @@
temperature represents the parameter for controlling randomness in the generated chat.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function ChatVision() {
const role = pg.Roles.User;
const question = 'is there a deer in this picture';
const image = new pg.ImageNetwork('https://pbs.twimg.com/profile_images/1571574401107169282/ylAgz_f5_400x400.jpg');
// const file = new pg.ImageFile('/Users/bill/Documents/images/pGwOq5tz_400x400.jpg');
const maxTokens = 300;
const temperature = 0.1;
var [result, err] = await client.ChatVision(role, question, image, maxTokens, temperature);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.createdDate() + ': ' + result.model + ': ' + result.choices[0].message.content);
}
ChatVision();
@@ -76,46 +77,55 @@
temperature represents the parameter for controlling randomness in generated chat.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Completions() {
const model = pg.Models.NeuralChat7B;
const maxTokens = 1000;
const temperature = 1.1;
const prompt = 'Will I lose my hair';
var [result, err] = await client.Completion(model, maxTokens, temperature, prompt);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.choices[0].text);
}
Completions();
-Factuality checks the factuality of a given text compared to a reference.
+Embedding generates chat completions based on a conversation history.
+input represents a collection of +text and images to vectorize.
+import * as pg from 'predictiongaurd';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Embedding() {
const image = new pg.ImageNetwork('https://pbs.twimg.com/profile_images/1571574401107169282/ylAgz_f5_400x400.jpg');
const input = [
{
text: 'This is Bill Kennedy, a decent Go developer.',
image: image,
},
];
var [result, err] = await client.Embedding(input);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
for (const dt of result.data) {
process.stdout.write(dt.embedding.toString());
}
}
Embedding();
+
+Factuality checks the factuality of a given text compared to a reference.
reference represents the reference text for comparison.
text represents the text to be checked for factuality.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Factuality() {
const fact = `The President shall receive in full for his services during
the term for which he shall have been elected compensation in the aggregate
amount of 400,000 a year, to be paid monthly, and in addition an expense
allowance of 50,000 to assist in defraying expenses relating to or resulting
from the discharge of his official duties. Any unused amount of such expense
allowance shall revert to the Treasury pursuant to section 1552 of title 31,
United States Code. No amount of such expense allowance shall be included in
the gross income of the President. He shall be entitled also to the use of
the furniture and other effects belonging to the United States and kept in
the Executive Residence at the White House.`;
const text = `The president of the united states can take a salary of one
million dollars`;
var [result, err] = await client.Factuality(fact, text);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + JSON.stringify(result.checks[0]));
}
Factuality();
-HealthCheck validates the PG API Service is available.
+HealthCheck validates the PG API Service is available.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function HealthCheck() {
var [result, err] = await client.HealthCheck();
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log(result);
}
HealthCheck();
-Injection detects potential prompt injection attacks in a given prompt.
prompt represents the text to detect injection attacks against.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Injection() {
const prompt = `A short poem may be a stylistic choice or it may be that you
have said what you intended to say in a more concise way.`;
var [result, err] = await client.Injection(prompt);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.checks[0].probability);
}
Injection();
-Protected
RawRawDoGet performs a raw GET call.
+Protected
RawRawDoGet performs a raw GET call.
endpoint represents endpoint to call and does not include the transport or domain.
Protected
RawRawDoPost performs a raw POST call.
+Protected
RawRawDoPost performs a raw POST call.
endpoint represents endpoint to call and does not include the transport or domain.
body represents an input object.
@@ -123,7 +133,7 @@Protected
RawRawDoSSEPost performs a raw POST call with SSE support.
+Protected
RawRawDoSSEPost performs a raw POST call with SSE support.
endpoint represents endpoint to call and does not include the transport or domain.
body represents an input object.
@@ -132,37 +142,37 @@ReplacePI replaces personal information such as names, SSNs, and +
ReplacePI replaces personal information such as names, SSNs, and emails in a given text.
replaceMethod represents the method to use for replacing personal information.
prompt represents the text to detect injection attacks against.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function ReplacePI() {
const replaceMethod = pg.ReplaceMethods.Mask;
const prompt = `My email is bill@ardanlabs.com and my number is 954-123-4567.`;
var [result, err] = await client.ReplacePI(replaceMethod, prompt);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.checks[0].new_prompt);
}
ReplacePI();
-Toxicity checks the toxicity of a given text.
text represents the text to be scored for toxicity.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Toxicity() {
const text = `Every flight I have is late and I am very angry. I want to
hurt someone.`;
var [result, err] = await client.Toxicity(text);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.checks[0].score);
}
Toxicity();
-Translate converts text from one language to another.
import * as pg from 'predictionguard';
const client = new pg.Client('https://api.predictionguard.com', process.env.PGKEY);
async function Translate() {
const sourceLang = pg.Languages.English;
const targetLang = pg.Languages.Spanish;
const text = `The rain in Spain stays mainly in the plain`;
var [result, err] = await client.Translate(text, sourceLang, targetLang);
if (err != null) {
console.log('ERROR:' + err.error);
return;
}
console.log('RESULT:' + result.best_translation);
}
Translate();
-
temperature represents the parameter for controlling randomness in generated chat.