Skip to content

Commit e7c1f4f

Browse files
Update README
1 parent 4ace729 commit e7c1f4f

File tree

1 file changed

+36
-27
lines changed

1 file changed

+36
-27
lines changed

README.md

Lines changed: 36 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,41 @@
1-
# Vapiai
1+
# Vapi Example for Express
22

33
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/-BeLLh) [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy) [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
44

5-
**This workspace has been generated by [Nx, Smart Monorepos · Fast CI.](https://nx.dev)**
5+
Welcome to the Vapi Serverless Vercel sample project. This project demonstrates how you can extend the functionalities of Vapi, an abstraction layer for your personal assistant, to create a unique experience tailored for story writers. Using this project, writers can design characters for their stories through voice interactions with the assistant.
66

7-
## Start the app
7+
## Project Overview
88

9-
To start the development server run `nx serve vapiai`. Open your browser and navigate to http://localhost:4200/. Happy coding!
9+
The project showcases the following customizations:
1010

11-
## Generate code
11+
- **Function Calling**: Writers can invoke custom functions to retrieve character inspirations and generate random names based on specific criteria. For more info [click here](api/custom-llm/README.md)
12+
- **Custom Large Language Model (LLM) Integration**: Enhance conversational capabilities by integrating custom LLMs with Vapi for nuanced and context-aware interactions. For more info [click here](api/functions/README.md)
13+
- **Server URL Events**: Handle various events during a call's lifecycle, such as function calls and assistant requests, to provide dynamic responses. For more info [click here](api/webhook/README.md)
1214

13-
If you happen to use Nx plugins, you can leverage code generators that might come with it.
15+
## Features
1416

15-
Run `nx list` to get a list of available plugins and whether they have generators. Then run `nx list <plugin-name>` to see what generators are available.
17+
- **Creative Prompts for Character Development**: Utilize the function that provides creative prompts for character development to get inspired based on a query provided by the author.
18+
- **Random Name Generation**: Use a public endpoint to generate random names, with options to specify gender and nationality based on user input.
19+
- **Advanced Conversational Interactions**: Leverage advanced LLMs to improve natural language understanding and generation for complex conversations.
1620

17-
Learn more about [Nx generators on the docs](https://nx.dev/features/generate-code).
21+
## Getting Started
22+
23+
To get started with this project:
24+
25+
1. Clone the repository to your local machine.
26+
2. Install the dependencies by running `pnpm install`.
27+
3. Explore the `src/handlers` directory to understand how the function calling and custom LLM integrations and webhook event handling are set up.
28+
4. Review the types directory to see the data structures used for handling Vapi events and payloads.
29+
5. Check the data directory for sample data that the function for creative character prompts can use.
30+
6. Remove any unnecessary code and start adding your own logic.
31+
7. There is sample json in `./assistants` folder. You can use that to create Vapi assistant and then test it.
1832

1933
## Running tasks
2034

2135
To execute tasks with Nx use the following syntax:
2236

2337
```
24-
nx <target> <project> <...options>
38+
nx <target> vapiai <...options>
2539
```
2640

2741
You can also run multiple targets:
@@ -38,31 +52,26 @@ nx run-many -t <target1> <target2> -p <proj1> <proj2>
3852

3953
Targets can be defined in the `package.json` or `projects.json`. Learn more [in the docs](https://nx.dev/features/run-tasks).
4054

41-
## Want better Editor Integration?
42-
43-
Have a look at the [Nx Console extensions](https://nx.dev/nx-console). It provides autocomplete support, a UI for exploring and running tasks & generators, and more! Available for VSCode, IntelliJ and comes with a LSP for Vim users.
44-
4555
## Ready to deploy?
4656

47-
Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/` directory, ready to be deployed.
57+
Just run `nx build demoapp` to build the application. The build artifacts will be stored in the `dist/vapiai` directory, ready to be deployed.
58+
59+
## Assistant Setup.
4860

49-
## Set up CI!
61+
- **Using Dashboard**: For you to create an assistant you can create a simple one by directly going to your dashboard and creating one from the UI.
62+
- **Using POST Endpoint**: You can also create your assistant using POST `https://api.vapi.ai/assistant` with your API Key (Dashboard > Accounts > Vapi Keys) as Bearer Token and choose any body from `./assistants` folder.
5063

51-
Nx comes with local caching already built-in (check your `nx.json`). On CI you might want to go a step further.
64+
Once assistant is created You may setup your server Url (`http://<domain>/api/webhook`) in the Dashboard > Accounts > Settings > Server URL. This will set the server URL for all assistants. If you want to set the serverUrl per assistant by using `serverUrl` key in the assistant body while creating.
5265

53-
- [Set up remote caching](https://nx.dev/features/share-your-cache)
54-
- [Set up task distribution across multiple machines](https://nx.dev/nx-cloud/features/distribute-task-execution)
55-
- [Learn more how to setup CI](https://nx.dev/recipes/ci)
66+
## Examples
5667

57-
## Explore the Project Graph
68+
Here are some examples of how the custom functionalities can be used:
5869

59-
Run `nx graph` to show the graph of the workspace.
60-
It will show tasks that you can run with Nx.
70+
- A writer asks Vapi for help with character development, and Vapi responds with a creative prompt from the function designed for this purpose.
71+
- A writer requests a random name for a character, and Vapi uses the function for random name generation to provide a name with the specified gender and nationality.
6172

62-
- [Learn more about Exploring the Project Graph](https://nx.dev/core-features/explore-graph)
73+
## Conclusion
6374

64-
## Connect with us!
75+
This sample project illustrates the power of Vapi customization for specific use cases, such as assisting story writers in their creative process. By following the examples and guidelines provided, developers can create a more versatile and responsive voice assistant that caters to the unique needs of their users.
6576

66-
- [Join the community](https://nx.dev/community)
67-
- [Subscribe to the Nx Youtube Channel](https://www.youtube.com/@nxdevtools)
68-
- [Follow us on Twitter](https://twitter.com/nxdevtools)
77+
For additional help and documentation, refer to the official [Vapi documentation](https://docs.vapi.ai).

0 commit comments

Comments
 (0)