Coder Social home page Coder Social logo

chatgpt-azure's Introduction

ChatGPT Azure

The ChatGPT Azure package for Deep allows seamless GPT-3.5/GPT-4 integration in your projects, providing AI-powered conversations.

npm Gitpod Discord

Guide to Using the ChatGPT Azure Package from Deep Foundation

1. Opening Gitpod

  • Navigate to Gitpod.
  • Wait for the development environment to be fully loaded.

2. Opening the Port and Logging in as Admin

  • 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.

3. Installing the ChatGPT Azure Package

  • Open Packager in the DeepCase interface.
  • Locate and install the @deep-foundation/chatgpt-azure && @deep-foundation/chatgpt-azure-deep package.

4. Granting Admin Rights to All Packages

  • 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'),
  },
]);

5. Inserting the API Key

  • Create an ApiKey link.
  • Open its editor, insert your API key, and save the changes (Ctrl+S).

6. Selecting the Model

  • To view the available prepared models, right-click on the @deep-foundation/chatgpt-azure-deep 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 chosen Model from the prepared ones. Then, execute the following query, replacing MODEL with 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-azure-deep"),
  to_id: MODEL,
  in: {
    type_id: await deep.id("@deep-foundation/core", "Contain"),
    from_id: await deep.id("@deep-foundation/chatgpt-azure-deep"),
  }
});

await deep.insert({
  type_id: await deep.id("@deep-foundation/openai", "UsesModel"),
  from_id: 380, // Your adminLinkId here
  to_id: MODEL,
  in: {
    type_id: await deep.id("@deep-foundation/core", "Contain"),
    from_id: 380, // Your adminLinkId here
  }
});

7. Using the ChatGPT Azure Package

  • Exit from the package space.
  • Create a Conversation link specifically from the @deep-foundation/chatgpt-azure package.
  • Create a Message link, open its editor, write your question as the value, and save the changes (Ctrl+S).
  • Create a Reply link from your Message to Conversation to send the request.

8. Viewing the Answer and Continuing the Dialogue

  • 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 Reply link from your message to the last response from ChatGPT.

9. Repeating the Process

  • Repeat these steps whenever you want to interact with ChatGPT or create a new dialogue.

chatgpt-azure's People

Contributors

flakeed avatar freephoenix888 avatar

Watchers

 avatar  avatar  avatar

chatgpt-azure's Issues

Error when reusing ClientHandler `Manager` of package `chatgpt-azure`

If you try to reuse the ClientHendler Maneger of the chatgpt-azure package, you may receive an error indicating that there are two UsesApiKey relationships:

rejected {
   name: 'Error',
   message: 'More than 1 links of type ##1156 are found',
   stack: 'Error: More than 1 links of type ##1156 are found\n' +
     ' at getTokenLink (eval at memoized (/node_modules/lodash/memoize.js:62:23), <anonymous>:366:13)\n' +
     ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n' +
     ' at async eval (eval at memoized (/node_modules/lodash/memoize.js:62:23), <anonymous>:45:22)'
}
rejected {
   name: 'TypeError',
   message: "Cannot read properties of undefined (reading 'replace')",
   stack: "TypeError: Cannot read properties of undefined (reading 'replace')\n" +
     ' at eval (eval at memoized (/node_modules/lodash/memoize.js:62:23), <anonymous>:49:6)\n' +
     ' at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
}

If you delete any one UsesApiKey, there will be no error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.