Get suggestions for a given query in real time.
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 200,
"total_tokens": 342
}
}
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 200,
"total_tokens": 342
}
}
import { JigsawStack } from "jigsawstack";
const jigsaw = JigsawStack({ apiKey: "your-api-key" });
const response = await jigsaw.web.search_suggestions({
"query": "What is the capital"
})
{
"success": true,
"suggestions": [
"what is the capital of california",
"what is the capital of canada",
"what is the capital of australia",
"what is the capital of texas",
"what is the capital of the united states",
"what is the capital of florida",
"what is the capital of brazil",
"what is the capital of new york",
"what is the capital of alaska",
"what is the capital of italy",
"what is the capital of japan",
"what is the capital gains tax rate",
"what is the capital of maine",
"what is the capital of illinois",
"what is the capital of turkey"
],
"_usage": {
"input_tokens": 8,
"output_tokens": 134,
"inference_time_tokens": 200,
"total_tokens": 342
}
}