Skip to content

Commit d3a85c1

Browse files
authored
Example code snippets (#454)
* feat: add phone support agent workflow example * feat: update navigation to link new customer support hotline example * feat: add screenshots for customer support hotline example * fix: customer support hotline intro paragraph * fix(customer-support-hotline): image URLs * fix(customer-support-hotline): remove broken link from outro * chore (customer-support-hotline): refine copy, add videos * chore(customer-support-hotline): delete unnecessary screenshots * fix(customer-support-hotline): slug * feat(appointment-scheduling): initial commit * feat(banking-customer-support): update example to cover a banking use case * chore(inbound-support): address review feedback, fix system prompt * feat(appointment-scheduling): new workflow example * feat(clinic-triage-scheduling): new workflow example * feat(ecommerce-order-management): new workflow example * feat(outbound-sales): new workflow example * chore: delete pizza example * fix: broken video URLs * chore: update navigation to include new workflow examples * fix(inbound-support): broken video URL * chore: update `overview.mdx` to display new examples * feat(call-forwarding): update doc to incentivize use of dashboard * feat(using-query-tool): update doc to incentivize use of dashboard * feat(custom-tools): update doc to incentivize use of dashboard * feat(workflows/overview): add doc * feat(workflows/quickstart): add doc * feat(workflows): move docs, add new videos * chore: update nav to include workflow docs * feat(docs-agent): add code snippets * feat(examples/inbound-support): add code snippets * feat(examples/outbound-call-python): add code snippets * feat(examples/voice-widget): add code snippets * feat(quickstart/dashboard): add code snippets * feat(workflows/quickstart): add code snippets * feat(workflows/appointment-scheduling): add code snippets * feat(workflows/clinic-triage-scheduling): add code snippets * feat(workflows/ecommerce-order-management): add code snippets * feat(workflows/outbound-sales): add code snippets * chore: delete `.DS_Store` * feat(workflows/quickstart): new code examples * feat(examples/docs-agent): new code examples * feat(examples/inbound-support): new code examples * feat(examples/voice-widget): new code examples * feat(quickstart/dashboard): new code examples * feat(quickstart/phone): new code examples * feat(workflows/outbound-sales): new code examples * feat(workflows/ecommerce-order-management): new code examples * feat(workflows/appointment-scheduling): new code examples * feat(workflows/clinic-triage-scheduling): new code examples * chore: add other pm install options, cleanup * chore: replace `gpt-4` occurrences with `gpt-4o` to stay up-to-date * chore: replace `gpt-3.5-turbo` occurrences with `gpt-4o` to stay up-to-date * chore: delete `outbound-call-python` example * fix: code examples * fix: delete duplicate merge doc * chore: cleanup video assets * chore: cleanup merge duplicates, restructure dirs for consistency
1 parent 6cea766 commit d3a85c1

30 files changed

+6032
-1140
lines changed

fern/assistants/personalization.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ This approach is ideal for use cases like customer support, account management,
105105
name: "Dynamic Customer Support Assistant",
106106
model: {
107107
provider: "openai",
108-
model: "gpt-4",
108+
model: "gpt-4o",
109109
messages: [{
110110
role: "system",
111111
content: `You are helping ${customer.name}, a ${customer.tier} member since ${customer.createdAt}.`

fern/customization/custom-llm/tool-calling-integration.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Once your endpoints are set up, try testing them with these cURL commands.
241241
curl -X POST https://custom-llm-url/chat/completions \
242242
-H "Content-Type: application/json" \
243243
-d '{
244-
"model": "gpt-3.5-turbo",
244+
"model": "gpt-4o",
245245
"messages": [
246246
{"role": "user", "content": "I need a payment link."}
247247
],
@@ -268,7 +268,7 @@ Streaming chunks eventually include the result (e.g., a payment link) returned b
268268
curl -X POST https://custom-llm-url/chat/completions \
269269
-H "Content-Type: application/json" \
270270
-d '{
271-
"model": "gpt-3.5-turbo",
271+
"model": "gpt-4o",
272272
"messages": [
273273
{"role": "user", "content": "Please transfer my call."}
274274
],
@@ -423,4 +423,4 @@ By building each layer step by step and testing with cURL, you can fine-tune you
423423
For your convenience, you can find the complete source code for this Custom LLM integration here:
424424
425425
**[Custom LLM with Vapi Integration – Complete Code](https://codesandbox.io/p/devbox/gfwztp)**
426-
```
426+
```

fern/customization/custom-transcriber.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,26 @@ You'll learn how to:
6363
mkdir vapi-custom-transcriber
6464
cd vapi-custom-transcriber
6565
npm init -y
66+
```
67+
68+
<CodeBlocks>
69+
```bash title="npm"
6670
npm install ws express dotenv @deepgram/sdk
6771
```
72+
73+
```bash title="yarn"
74+
yarn add ws express dotenv @deepgram/sdk
75+
```
76+
77+
```bash title="pnpm"
78+
pnpm add ws express dotenv @deepgram/sdk
79+
```
80+
81+
```bash title="bun"
82+
bun add ws express dotenv @deepgram/sdk
83+
```
84+
</CodeBlocks>
85+
6886
Create a `.env` file with the following content:
6987
```env
7088
DEEPGRAM_API_KEY=your_deepgram_api_key

fern/customization/jwt-authentication.mdx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ For example, it can be used to restrict which API endpoints the token can access
3131

3232
<Note>
3333
As of writing, the only publicly scoped API endpoint is
34-
https://api.vapi.ai//call/web, which is used for Web Call creation. All other
34+
https://api.vapi.ai/call/web, which is used for Web Call creation. All other
3535
endpoints are privately scoped.
3636
</Note>
3737

@@ -136,18 +136,7 @@ If you set the scope to `public`, you can use it to make authenticated API reque
136136
```
137137
import Vapi from '@vapi-ai/web';
138138
139-
const vapi = new Vapi({
140-
token: 'your-jwt-token',
141-
});
139+
const vapi = new Vapi('your-jwt-token');
142140
143141
vapi.start('your-assistant-id');
144142
```
145-
146-
## Notes
147-
148-
- With the generated token, you can authenticate API requests to any endpoint requiring authentication. The token will be valid for the duration specified in the options (1 hour in this case).
149-
- If you don't specify `token` in the JWT payload, the token will be public.
150-
151-
## Conclusion
152-
153-
This documentation covered the basics of generating a JWT token and demonstrated how to use the token to make authenticated API requests. Ensure that your environment variables (e.g., `ORG_ID` and `PRIVATE_KEY`) are correctly set up before running the code.

fern/docs.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,15 +746,13 @@ redirects:
746746
- source: "/multilingual/introduction"
747747
destination: "/multilingual"
748748
- source: "/outbound_sales"
749-
destination: "/examples/outbound-sales"
749+
destination: "/examples/lead-qualification"
750750
- source: "/technical_support"
751751
destination: "/examples/inbound-support"
752752
- source: "/pizza_website"
753753
destination: "/examples/inbound-support"
754754
- source: "/examples/pizza-website"
755755
destination: "/examples/inbound-support"
756-
- source: "/outbound_call_python"
757-
destination: "/examples/outbound-call-python"
758756
- source: "/voice_widget"
759757
destination: "/examples/voice-widget"
760758
- source: "/clients"

0 commit comments

Comments
 (0)