This project is a web application that uses AI to get information about any IP address. It's powered by GreyNoise Enterprise API and OpenAI's GPT-4 Turbo x Function Calling.
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
This project uses several dependencies, including:
- Next.js
- React
- TypeScript
- Tailwind CSS
- Headless UI
- Heroicons
- Classnames
- Lodash
- OpenAI
- React Markdown
- React Textarea Autosize
The functions are stored in utils/functions.ts
, the examples are stored in utils/data.ts
, and the API calls are stored in pages/api/generate.ts
.
To add new functions, open utils/functions.ts
, do the following:
- Create a new async function that takes in a string as a parameter and returns a promise.
- Add the function to the switch statement in the
runFunction
function. - Then add the function to the
functions
array. The function should have the following properties:
name
: The name of the functiondescription
: A description of the functionparameters
: An array of objects with the following properties:name
: The name of the parametertype
: The type of the parameterdescription
: A description of the parameter
To add new examples, open utils/data.ts
and add a new example to the examples
array. The example should be simple text.