Skip to content

Commit aa0f980

Browse files
committed
Merge remote-tracking branch 'origin/main' into fern/update-api-specs
2 parents 9ee8a61 + f5bf575 commit aa0f980

File tree

13 files changed

+611
-164
lines changed

13 files changed

+611
-164
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/.definition
22
**/.preview/**
33
.env
4+
.DS_Store

fern/apis/api/openapi.json

Lines changed: 176 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13027,7 +13027,15 @@
1302713027
"#",
1302813028
"*",
1302913029
""
13030-
]
13030+
],
13031+
"x-fern-enum": {
13032+
"#": {
13033+
"name": "Hash"
13034+
},
13035+
"*": {
13036+
"name": "Asterisk"
13037+
}
13038+
}
1303113039
}
1303213040
}
1303313041
},
@@ -19624,6 +19632,173 @@
1962419632
"updatedAt"
1962519633
]
1962619634
},
19635+
"CreateOutputToolDTO": {
19636+
"type": "object",
19637+
"properties": {
19638+
"async": {
19639+
"type": "boolean",
19640+
"description": "This determines if the tool is async.\n\nIf async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\nIf sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\nDefaults to synchronous (`false`).",
19641+
"example": false
19642+
},
19643+
"messages": {
19644+
"type": "array",
19645+
"description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.",
19646+
"items": {
19647+
"oneOf": [
19648+
{
19649+
"$ref": "#/components/schemas/ToolMessageStart",
19650+
"title": "ToolMessageStart"
19651+
},
19652+
{
19653+
"$ref": "#/components/schemas/ToolMessageComplete",
19654+
"title": "ToolMessageComplete"
19655+
},
19656+
{
19657+
"$ref": "#/components/schemas/ToolMessageFailed",
19658+
"title": "ToolMessageFailed"
19659+
},
19660+
{
19661+
"$ref": "#/components/schemas/ToolMessageDelayed",
19662+
"title": "ToolMessageDelayed"
19663+
}
19664+
]
19665+
}
19666+
},
19667+
"provider": {
19668+
"type": "string",
19669+
"description": "The provider of the knowledge base",
19670+
"enum": [
19671+
"google"
19672+
],
19673+
"example": "google"
19674+
},
19675+
"model": {
19676+
"type": "object",
19677+
"description": "The model to use for the knowledge base",
19678+
"enum": [
19679+
"gemini-2.0-flash-thinking-exp",
19680+
"gemini-2.0-pro-exp-02-05",
19681+
"gemini-2.0-flash",
19682+
"gemini-2.0-flash-lite-preview-02-05",
19683+
"gemini-2.0-flash-exp",
19684+
"gemini-2.0-flash-realtime-exp",
19685+
"gemini-1.5-flash",
19686+
"gemini-1.5-flash-002",
19687+
"gemini-1.5-pro",
19688+
"gemini-1.5-pro-002",
19689+
"gemini-1.0-pro"
19690+
],
19691+
"example": "gemini-1.5-flash"
19692+
},
19693+
"description": {
19694+
"type": "string",
19695+
"description": "A description of the knowledge base"
19696+
},
19697+
"fileIds": {
19698+
"description": "The file IDs associated with this knowledge base",
19699+
"type": "array",
19700+
"items": {
19701+
"type": "string"
19702+
}
19703+
}
19704+
},
19705+
"required": [
19706+
"name",
19707+
"provider",
19708+
"model",
19709+
"description",
19710+
"fileIds"
19711+
]
19712+
},
19713+
"QueryTool": {
19714+
"type": "object",
19715+
"properties": {
19716+
"async": {
19717+
"type": "boolean",
19718+
"description": "This determines if the tool is async.\n\nIf async, the assistant will move forward without waiting for your server to respond. This is useful if you just want to trigger something on your server.\n\nIf sync, the assistant will wait for your server to respond. This is useful if want assistant to respond with the result from your server.\n\nDefaults to synchronous (`false`).",
19719+
"example": false
19720+
},
19721+
"messages": {
19722+
"type": "array",
19723+
"description": "These are the messages that will be spoken to the user as the tool is running.\n\nFor some tools, this is auto-filled based on special fields like `tool.destinations`. For others like the function tool, these can be custom configured.",
19724+
"items": {
19725+
"oneOf": [
19726+
{
19727+
"$ref": "#/components/schemas/ToolMessageStart",
19728+
"title": "ToolMessageStart"
19729+
},
19730+
{
19731+
"$ref": "#/components/schemas/ToolMessageComplete",
19732+
"title": "ToolMessageComplete"
19733+
},
19734+
{
19735+
"$ref": "#/components/schemas/ToolMessageFailed",
19736+
"title": "ToolMessageFailed"
19737+
},
19738+
{
19739+
"$ref": "#/components/schemas/ToolMessageDelayed",
19740+
"title": "ToolMessageDelayed"
19741+
}
19742+
]
19743+
}
19744+
},
19745+
"type": {
19746+
"type": "string",
19747+
"enum": [
19748+
"query"
19749+
],
19750+
"description": "The type of tool. \"query\" for Query tool."
19751+
},
19752+
"knowledgeBases": {
19753+
"description": "The knowledge bases to query",
19754+
"type": "array",
19755+
"items": {
19756+
"$ref": "#/components/schemas/KnowledgeBase"
19757+
}
19758+
},
19759+
"id": {
19760+
"type": "string",
19761+
"description": "This is the unique identifier for the tool."
19762+
},
19763+
"orgId": {
19764+
"type": "string",
19765+
"description": "This is the unique identifier for the organization that this tool belongs to."
19766+
},
19767+
"createdAt": {
19768+
"format": "date-time",
19769+
"type": "string",
19770+
"description": "This is the ISO 8601 date-time string of when the tool was created."
19771+
},
19772+
"updatedAt": {
19773+
"format": "date-time",
19774+
"type": "string",
19775+
"description": "This is the ISO 8601 date-time string of when the tool was last updated."
19776+
},
19777+
"function": {
19778+
"description": "This is the function definition of the tool.\n\nFor `endCall`, `transferCall`, and `dtmf` tools, this is auto-filled based on tool-specific fields like `tool.destinations`. But, even in those cases, you can provide a custom function definition for advanced use cases.\n\nAn example of an advanced use case is if you want to customize the message that's spoken for `endCall` tool. You can specify a function where it returns an argument \"reason\". Then, in `messages` array, you can have many \"request-complete\" messages. One of these messages will be triggered if the `messages[].conditions` matches the \"reason\" argument.",
19779+
"allOf": [
19780+
{
19781+
"$ref": "#/components/schemas/OpenAIFunction"
19782+
}
19783+
]
19784+
},
19785+
"server": {
19786+
"description": "This is the server that will be hit when this tool is requested by the model.\n\nAll requests will be sent with the call object among other things. You can find more details in the Server URL documentation.\n\nThis overrides the serverUrl set on the org and the phoneNumber. Order of precedence: highest tool.server.url, then assistant.serverUrl, then phoneNumber.serverUrl, then org.serverUrl.",
19787+
"allOf": [
19788+
{
19789+
"$ref": "#/components/schemas/Server"
19790+
}
19791+
]
19792+
}
19793+
},
19794+
"required": [
19795+
"type",
19796+
"id",
19797+
"orgId",
19798+
"createdAt",
19799+
"updatedAt"
19800+
]
19801+
},
1962719802
"CreateOutputToolDTO": {
1962819803
"type": "object",
1962919804
"properties": {

fern/assets/trieve-user-script.js

Lines changed: 82 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -10,82 +10,101 @@
1010
// ==/UserScript==
1111

1212
const removeAllClickListeners = (element) => {
13-
const newElement = element.cloneNode(true);
14-
element.parentNode.replaceChild(newElement, element);
15-
return newElement;
13+
try {
14+
const newElement = element?.cloneNode(true);
15+
element.parentNode.replaceChild(newElement, element);
16+
return newElement;
17+
} catch (e) {
18+
return element;
19+
}
1620
};
1721

1822
const makeDefaultSearchTrieve = async () => {
19-
let defaultSearchBar = null;
20-
let retries = 0;
21-
while (!defaultSearchBar && retries < 10) {
22-
for (const el of document.querySelectorAll("*")) {
23-
if (el.querySelector('[aria-label="Search"]')) {
24-
defaultSearchBar = el.querySelector('[aria-label="Search"]');
25-
break;
23+
try {
24+
let defaultSearchBar = null;
25+
let retries = 0;
26+
while (!defaultSearchBar && retries < 10) {
27+
for (const el of document.querySelectorAll("*")) {
28+
if (el.querySelector('[aria-label="Search"]')) {
29+
defaultSearchBar = el.querySelector('[aria-label="Search"]');
30+
break;
31+
}
2632
}
33+
retries++;
34+
await new Promise((resolve) => setTimeout(resolve, 10));
2735
}
28-
retries++;
29-
await new Promise((resolve) => setTimeout(resolve, 10));
30-
}
31-
defaultSearchBar = removeAllClickListeners(defaultSearchBar);
36+
defaultSearchBar = removeAllClickListeners(defaultSearchBar);
3237

33-
defaultSearchBar.onclick = () => {
34-
const event = new CustomEvent("trieve-open-with-text", {
35-
detail: { text: "" },
36-
});
37-
window.dispatchEvent(event);
38-
};
38+
defaultSearchBar.onclick = () => {
39+
const event = new CustomEvent("trieve-open-with-text", {
40+
detail: { text: "" },
41+
});
42+
window.dispatchEvent(event);
43+
};
44+
} catch (e) {
45+
console.error(e);
46+
}
3947
};
40-
await makeDefaultSearchTrieve();
41-
setTimeout(makeDefaultSearchTrieve, 50);
42-
setTimeout(makeDefaultSearchTrieve, 100);
43-
setTimeout(makeDefaultSearchTrieve, 250);
44-
setTimeout(makeDefaultSearchTrieve, 500);
45-
setTimeout(makeDefaultSearchTrieve, 1000);
46-
setTimeout(makeDefaultSearchTrieve, 2000);
47-
setTimeout(makeDefaultSearchTrieve, 3000);
48+
try {
49+
await makeDefaultSearchTrieve();
50+
setTimeout(makeDefaultSearchTrieve, 50);
51+
setTimeout(makeDefaultSearchTrieve, 100);
52+
setTimeout(makeDefaultSearchTrieve, 250);
53+
setTimeout(makeDefaultSearchTrieve, 500);
54+
setTimeout(makeDefaultSearchTrieve, 1000);
55+
setTimeout(makeDefaultSearchTrieve, 2000);
56+
setTimeout(makeDefaultSearchTrieve, 3000);
57+
} catch (e) {
58+
console.error(e);
59+
}
4860

4961
(async function () {
5062
"use strict";
51-
const link = document.createElement("link");
52-
link.rel = "stylesheet";
53-
link.href = "https://cdn.trieve.ai/beta/search-component/index.css";
54-
document.head.appendChild(link);
55-
63+
try {
64+
const link = document.createElement("link");
65+
link.rel = "stylesheet";
66+
link.href = "https://cdn.trieve.ai/beta/search-component/index.css";
67+
document.head.appendChild(link);
68+
} catch (e) {
69+
console.error(e);
70+
}
5671
import("https://cdn.trieve.ai/beta/search-component/vanilla/index.js").then(
5772
async (module) => {
58-
const { renderToDiv } = module;
59-
const root = document.createElement("div");
60-
root.classList.add("trigger");
61-
document.body.appendChild(root);
62-
const colorScheme = document.documentElement?.style?.colorScheme;
63-
const brandColor = colorScheme === "dark" ? "#47ffb6d5" : "#00551dcd";
73+
try {
74+
const { renderToDiv } = module;
75+
const root = document.createElement("div");
76+
root.classList.add("trigger");
77+
document.body.appendChild(root);
78+
const colorScheme = document.documentElement?.style?.colorScheme;
79+
const brandColor = colorScheme === "dark" ? "#47ffb6d5" : "#00551dcd";
6480

65-
renderToDiv(root, {
66-
apiKey: "tr-hZMKSsTf3ML9hJbAAqPO8K91p9IVe9Oc",
67-
datasetId: "d3493dc0-2b5c-4c6e-a8ee-b18feeed5b06",
68-
baseUrl: "https://api.trieve.ai",
69-
type: "docs",
70-
analytics: true,
71-
theme: colorScheme === "dark" ? "dark" : null,
72-
brandLogoImgSrcUrl:
73-
"https://storage.googleapis.com/organization-image-assets/vapi-botAvatarDarkSrcUrl-1709929110474.png",
74-
brandName: "Vapi",
75-
brandColor: brandColor,
76-
placeholder: "How can I help?",
77-
defaultSearchQueries: ["quickstart", "assistant", "tools"],
78-
defaultAiQuestions: [
79-
"What voices are supported?",
80-
"What languages are supported?",
81-
"How do I connect a custom LLM?",
82-
"How do I fetch the prompt dynamically?",
83-
],
84-
defaultSearchMode: "search",
85-
showFloatingButton: "true",
86-
cssRelease: "none",
87-
hideOpenButton: true,
88-
});
81+
renderToDiv(root, {
82+
apiKey: "tr-hZMKSsTf3ML9hJbAAqPO8K91p9IVe9Oc",
83+
datasetId: "d3493dc0-2b5c-4c6e-a8ee-b18feeed5b06",
84+
baseUrl: "https://api.trieve.ai",
85+
type: "docs",
86+
analytics: true,
87+
theme: colorScheme === "dark" ? "dark" : null,
88+
brandLogoImgSrcUrl:
89+
"https://storage.googleapis.com/organization-image-assets/vapi-botAvatarDarkSrcUrl-1709929110474.png",
90+
brandName: "Vapi",
91+
brandColor: brandColor,
92+
placeholder: "How can I help?",
93+
defaultSearchQueries: ["quickstart", "assistant", "tools"],
94+
defaultAiQuestions: [
95+
"What voices are supported?",
96+
"What languages are supported?",
97+
"How do I connect a custom LLM?",
98+
"How do I fetch the prompt dynamically?",
99+
],
100+
defaultSearchMode: "search",
101+
showFloatingButton: "true",
102+
cssRelease: "none",
103+
hideOpenButton: true,
104+
});
105+
} catch (e) {
106+
console.error(e);
107+
}
89108
},
90109
(error) => {
91110
console.error("Failed to load module:", error);

fern/assistants/voice-formatting-plan.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
title: Voice Formatting Plan
3+
subtitle: >-
4+
Learn what voice formatting plans are and how to format voice input dynamically for clearer and more natural text-to-speech interactions.
5+
slug: assistants/voice-formatting-plan
6+
---
7+
18
## What is Voice Input Formatted?
29

310
When interacting with voice assistants, you might notice terms like `Voice Input Formatted` in call logs or system outputs. This article explains what this means, how it works, and why it's important for delivering clear and natural voice interactions.

0 commit comments

Comments
 (0)