@deep-foundation/chatgpt
v3.1.0
Published
The ChatGPT package for Deep allows seamless GPT-3.5/GPT-4 integration in your projects, providing AI-powered conversations.
Downloads
66
Maintainers
Keywords
Readme
chatgpt
The ChatGPT package for Deep allows seamless GPT-3.5/GPT-4 integration in your projects, providing AI-powered conversations.
Steps for Starting to Use ChatGPT from Deep
Video instruction: https://www.youtube.com/watch?v=63oAjA536AE
Go to https://github.com/deep-foundation/dev and run Gitpod.
Wait for the Deep server to start in the terminal. Once it has started, you will see a message:
After the server starts, open the port tab and click on the link to open port 3007.
In the new tab, press f12 to open developer console:
- And paste following command here and press Enter: const adminId = await deep.id('deep', 'admin'); await deep.login({ linkId: adminId, });
- After clicking the menu on the side, you will see a new interface:
Insert a query link by right-clicking and holding down the right mouse button.
Open the editor by right-clicking and holding down the right mouse button on the query link:
- Insert this code: {id:{_gt:942}} and press Ctrl+S to save(if the id of your query connection is not 942, insert its current id instead of 942):
- Click on the query link, and then click on the next button:
The next step would be to paste the link of the 'PackageQuery'
Then you need to go to its editor and write the name of the package to be installed, in our case it is: @flakeed/chatgpt and press Ctrs+S:
After that we can install the package using install link from npm-packager, creating from user to our PackageQuery with package name
Click on "promises" to see results of async reactions
- ChatGPT package and it dependency Messaging are installed
Insert the "Join" link from the chatgpt package to the user:
Now you can create links to start a chat and chat with ChatGPT:
First, you need to create an API key for the ChatGPT API by visiting this link: https://platform.openai.com/account/api-keys: Then, copy the API key:
Create an OpenAiApiKey link and paste the token from previous step into the editor. Save it by pressing Ctrl+S:
Create a UsesOpenAiApiKey link to make OpenAiApiKey the current token from user to OpenAiApiKey(if you have one link "OpenAiApiKey" then you can skip this step, it is used automatically):
Using the UsesModel link(if you are satisfied with the default gpt-3.5-turbo model you can skip this step): And select the model that is on the screen: Creating from the user to the model, or create another model and specify the desired model in the editor, after which you need to create a UsesModel link from the desired Conversation to the model:
Create a Converstion link:
Create a Message link and enter your question for ChatGPT. Save it by pressing Ctrl+S:
Create a Reply link from the Message link to the Conversation link: After that you can see the response from ChatGPT
- To continue chatting with ChatGPT, create a Message link again and in its editor ask your question and press Ctrl+S, then create a Reply Link from the user's message you just created to the ChatGPT response from the previous request: After that we get another response from the bot:
That's all! You can now continue using ChatGPT by following step 14 as needed.