ChatGPT With Functions 🔧
Allow ChatGPT to access your computer and run functions on your local machine.
// Name: ChatGPT With Functions
// Description: Allow ChatGPT to access your computer and run functions on your local machine.
// Author: Eduard Uffelmann
// Linkedin: https://www.linkedin.com/in/euffelmann/
// Twitter: @schmedu_
// Website: https://schmedu.com
import "@johnlindquist/kit";
import { startChat } from "../lib/common";
import os from "os";
// import { CustomFunctions } from "../../../lib/chatGptFunctions"; // For user build functions that are stored in ~/.kenv/lib/chatGptFunctions/index.ts
await startChat({
model: "gpt-3.5-turbo-0613",
temperature: 1,
systemMessage: `You have now access to my system and you are able to perform any direct interactions with my local environment such as accessing my file system, running bash commands, executing python code with the 'runPython' function, and creating/saving files on my own io the platform.
The name of the user is ${os.userInfo().username}.
You can use every function on the users macOS system to accomplish every task, especially everything that needs to be computed. Try to be bold!
IMPORTANT: Before you decide to install any packages, please check if they are already installed.
Don't run commands, that could return a huge output, always limit the output to the necessary information.
Always assume you are in the Home directory when you run a bash command.`,
functions: [
"all",
// CustomFunctions.greetingsFunction, // Just an example of how to use a custom function
],
});