The ChatGPT package for Deep allows seamless GPT-3.5/GPT-4 integration in your projects, providing AI-powered conversations.
- Navigate to Gitpod.
- Wait for the development environment to be fully loaded.
- After the Deep server is up and running, open port 3007 by clicking on the link in the Ports tab.
- Open the developer console by pressing F12 and insert the following query to log in as admin and press Enter:
const adminId = await deep.id('deep', 'admin');
await deep.login({
linkId: adminId,
});- Upon successful login, a new interface with links will appear.
- Open
Packagerin the DeepCase interface. - Locate and install the
@deep-foundation/chatgptpackage.
- Insert the following query into the console to grant admin rights to all packages and press Enter:
const joinTypeLinkId = await deep.id("@deep-foundation/core", "Join");
await deep.insert([
{
type_id: joinTypeLinkId,
from_id: await deep.id('deep', 'users', 'packages'),
to_id: await deep.id('deep', 'admin'),
},
]);- Create an
ApiKeylink. - Open its editor, insert your API key, and save the changes (Ctrl+S).
Note: By default, the GPT-3.5 Model is used. If this is suitable for your needs, you can skip this step.
- To view the available prepared models, right-click on the package link -> space to enter the package space. Here, you can browse through and select the desired model.
- If you want to use another
Model, note down the ID of your chosenModelfrom the prepared ones. Then, execute the following query, replacingMODELwith the ID:
const MODEL = '1301'; // Your modelLinkID here
await deep.insert({
type_id: await deep.id("@deep-foundation/openai", "UsesModel"),
from_id: await deep.id("@deep-foundation/chatgpt"),
to_id: MODEL,
in: {
type_id: await deep.id("@deep-foundation/core", "Contain"),
from_id: await deep.id("@deep-foundation/chatgpt"),
}
});
await deep.insert({
type_id: await deep.id("@deep-foundation/openai", "UsesModel"),
from_id: await deep.id('deep', 'admin'),
to_id: MODEL,
in: {
type_id: await deep.id("@deep-foundation/core", "Contain"),
from_id: await deep.id('deep', 'admin'),
}
});- Exit from the package space.
- Create a
Conversationlink specifically from the@deep-foundation/chatgptpackage. - Create a
Messagelink, open its editor, write your question as the value, and save the changes (Ctrl+S). - Create a
Replylink from yourMessagetoConversationto send the request.
- To open all messages in the current chat,
Right-click on the Message link from the current Conversation -> traveler -> down -> messagingTree. - To continue the dialogue, create a new message with your question and a
Replylink from your message to the last response from ChatGPT.
- Repeat these steps whenever you want to interact with ChatGPT or create a new dialogue.