Share Your Wildest ChatGPT Conversations with one Click

ShareGPT

Share your wildest ChatGPT conversations with one click.

Introduction

ShareGPT is an open-source Chrome Extension for you to share your wildest ChatGPT conversations with one click.

Features

  • Share your ChatGPT conversations with one-click
  • Browse examples on sharegpt.com/explore
  • Save your favorite conversations for later
  • Leave comments on conversations

Tech Stack

ShareGPT is built with the following stack:

REST API

The ShareGPT API is a REST-styled API that allows you to write and read conversations from our database, exposed as HTTP endpoints.

Conversations Endpoint

POST: https://sharegpt.com/api/conversations

You can use this endpoint to add new conversations to our database.

First, if you haven't already, process the ShareGPT conversation using the following code:

function conversationData() {
  const threadContainer = document.querySelector(
    "#__next main div:nth-of-type(1) div:nth-of-type(1) div:nth-of-type(1) div:nth-of-type(1)"
  );

  var result = {
    avatarUrl: getAvatarImage(),
    items: [],
  };

  for (const node of threadContainer.children) {
    const markdownContent = node.querySelector(".markdown");

    // tailwind class indicates human or gpt
    if ([...node.classList].includes("dark:bg-gray-800")) {
      result.items.push({
        from: "human",
        value: node.textContent,
      });
      // if it's a GPT response, it might contain code blocks
    } else if ([...node.classList].includes("bg-gray-50")) {
      result.items.push({
        from: "gpt",
        value: markdownContent.outerHTML,
      });
    }
  }

  return result;
}

function getAvatarImage() {
  // Create a canvas element
  const canvas = document.createElement("canvas");

  const image = document.querySelectorAll("img")[1];

  // Set the canvas size to 30x30 pixels
  canvas.width = 30;
  canvas.height = 30;

  // Draw the img onto the canvas
  canvas.getContext("2d").drawImage(image, 0, 0);

  // Convert the canvas to a base64 string as a JPEG image
  const base64 = canvas.toDataURL("image/jpeg");

  return base64;
}

Then, send a POST request to the endpoint above with the following payload and request headers:

const res = await fetch("https://sharegpt.com/api/conversations", {
  body: JSON.stringify(conversationData),
  headers: {
    "Content-Type": "application/json",
  },
  method: "POST",
});

This will return an object with an id attribute which will be the unique identifier for the generated post:

const { id } = await res.json();
const url = `https://shareg.pt/${id}`; // short link to the ShareGPT post

GET: https://sharegpt.com/api/conversations

This endpoint takes 3 optional query parameters:

  • type:
    • Used for sorting the results.
    • Takes 2 string values: "new" | "top"
    • "new" sorts conversations by creation time
    • "top" sorts conversations by number of views
    • If undefined, defaults to "top"
  • page:
    • Used for pagination
    • Takes an integer value as a factor of the PAGINATION_LIMIT, which is set to 50.
    • E.g. to get posts 100 - 150, set page to 3
    • If undefined, defaults to 1
  • search
    • Used for filtering records by title.
    • E.g. search = "python" returns all records with the word "python" in the title
    • If undefined, search results are not filtered

Example:

await fetch(
  "https://sharegpt.com/api/conversations?type=new&page=2&search=python"
);

This returns a list of conversations with the following type:

interface ConversationMeta {
  id: string; // unique id for the conversation
  title: string; // title of the conversation (first user prompt)
  avatar: string; // base64 encoded URI of the user's avatar
  saves: number; // number of times the conversation is saved on ShareGPT
  comments: number; // number of comments the conversation has on ShareGPT
  views: number; // number of times the conversation has been viewed on ShareGPT
  createdAt: Date; // timestamp when the conversation was creataed
}
[];

Download Details:

Author: domeccleston
Source Code: https://github.com/domeccleston/sharegpt

#chatgpt 

What is GEEK

Buddha Community

Share Your Wildest ChatGPT Conversations with one Click

Share Your Wildest ChatGPT Conversations with one Click

ShareGPT

Share your wildest ChatGPT conversations with one click.

Introduction

ShareGPT is an open-source Chrome Extension for you to share your wildest ChatGPT conversations with one click.

Features

  • Share your ChatGPT conversations with one-click
  • Browse examples on sharegpt.com/explore
  • Save your favorite conversations for later
  • Leave comments on conversations

Tech Stack

ShareGPT is built with the following stack:

REST API

The ShareGPT API is a REST-styled API that allows you to write and read conversations from our database, exposed as HTTP endpoints.

Conversations Endpoint

POST: https://sharegpt.com/api/conversations

You can use this endpoint to add new conversations to our database.

First, if you haven't already, process the ShareGPT conversation using the following code:

function conversationData() {
  const threadContainer = document.querySelector(
    "#__next main div:nth-of-type(1) div:nth-of-type(1) div:nth-of-type(1) div:nth-of-type(1)"
  );

  var result = {
    avatarUrl: getAvatarImage(),
    items: [],
  };

  for (const node of threadContainer.children) {
    const markdownContent = node.querySelector(".markdown");

    // tailwind class indicates human or gpt
    if ([...node.classList].includes("dark:bg-gray-800")) {
      result.items.push({
        from: "human",
        value: node.textContent,
      });
      // if it's a GPT response, it might contain code blocks
    } else if ([...node.classList].includes("bg-gray-50")) {
      result.items.push({
        from: "gpt",
        value: markdownContent.outerHTML,
      });
    }
  }

  return result;
}

function getAvatarImage() {
  // Create a canvas element
  const canvas = document.createElement("canvas");

  const image = document.querySelectorAll("img")[1];

  // Set the canvas size to 30x30 pixels
  canvas.width = 30;
  canvas.height = 30;

  // Draw the img onto the canvas
  canvas.getContext("2d").drawImage(image, 0, 0);

  // Convert the canvas to a base64 string as a JPEG image
  const base64 = canvas.toDataURL("image/jpeg");

  return base64;
}

Then, send a POST request to the endpoint above with the following payload and request headers:

const res = await fetch("https://sharegpt.com/api/conversations", {
  body: JSON.stringify(conversationData),
  headers: {
    "Content-Type": "application/json",
  },
  method: "POST",
});

This will return an object with an id attribute which will be the unique identifier for the generated post:

const { id } = await res.json();
const url = `https://shareg.pt/${id}`; // short link to the ShareGPT post

GET: https://sharegpt.com/api/conversations

This endpoint takes 3 optional query parameters:

  • type:
    • Used for sorting the results.
    • Takes 2 string values: "new" | "top"
    • "new" sorts conversations by creation time
    • "top" sorts conversations by number of views
    • If undefined, defaults to "top"
  • page:
    • Used for pagination
    • Takes an integer value as a factor of the PAGINATION_LIMIT, which is set to 50.
    • E.g. to get posts 100 - 150, set page to 3
    • If undefined, defaults to 1
  • search
    • Used for filtering records by title.
    • E.g. search = "python" returns all records with the word "python" in the title
    • If undefined, search results are not filtered

Example:

await fetch(
  "https://sharegpt.com/api/conversations?type=new&page=2&search=python"
);

This returns a list of conversations with the following type:

interface ConversationMeta {
  id: string; // unique id for the conversation
  title: string; // title of the conversation (first user prompt)
  avatar: string; // base64 encoded URI of the user's avatar
  saves: number; // number of times the conversation is saved on ShareGPT
  comments: number; // number of comments the conversation has on ShareGPT
  views: number; // number of times the conversation has been viewed on ShareGPT
  createdAt: Date; // timestamp when the conversation was creataed
}
[];

Download Details:

Author: domeccleston
Source Code: https://github.com/domeccleston/sharegpt

#chatgpt 

How much does it cost to build a video sharing app?

There are so many things you can do with your mobile phone, regardless of which operating system you use. Your smartphone is a miniature computer, which means you can use it to browse the web, stream music and download apps galore. You can also share videos with certain apps. There is no doubt that video, editing, recording, and sharing application development will give a wholesome solution to your app users and will help you make your application stand out from the competitors.

Are you searching for the app development company who build video sharing app? If yes then AppClues Infotech is the best mobile app development company offer world-class mobile app development services at competitive prices across all major mobile platforms for start-ups as well as enterprises. Our team of professional designers and developers can proficiently develop a video sharing mobile app tailored to your needs, to help you achieve the end result of your business gaining more market autonomy.

Our Expertise in Mobile App Development:

  • iPhone App Development
  • iPad App Development
  • Apple Watch App Development
  • Flutter App Development
  • Android App Development
  • Ionic App Development
  • React Native App Development
  • Windows App Development
  • Cross-Platform App Development

We offer custom social networking app development solutions which are designed to not just make your brand a household name but also to keep your brand above the ever-growing crowd of entertainment mobile apps. We build mobile apps across various industry verticals including travel, social networking, restaurant, real estate, health care, news, etc.

The expense of video sharing app development depends on app size, app platform, app functionality, what features you require, the team of app developers, etc. So generally cost is in between $2,000 - 15,000. It can vary from app to app because every app has different requirements.

#video sharing app development #best video sharing app development company #top video sharing app development company #make a video sharing mobile app #cost to create a video sharing app

Dcode show

Dcode show

1675329550

How To Use ChatGPT For coding | Let ChatGPT Write Your HTML Code | ChatGPT

How To Use ChatGPT For coding | Let ChatGPT Write Your HTML Code | ChatGPT
#chatgpt #chatgptexplained #chatgpttutorial #chatgpt3 #chatgpt 
https://youtu.be/PBPeShtwtP8

Sagar Shende

Sagar Shende

1600355245

How to Use Shared Preferences to Stored Data in Flutter | Shared preferences Flutter

Shared preferences flutter is for Storing simple data on Device for Reading & writing Simple Key-value pairs in iOS & Android.

In Simple Example, Let Just Say You Just Want to Stored Simple Data on Phone And Later You can refer that Data whenever You Launch that App then Shared preferences will help you to Stored data on the Phone.

Shared preferences in flutter NSUserDefaults on iOS & macOS, and SharedPreferences on Android.

💻Shared Preferences:- https://alltechsavvy.com/shared-preferences-flutter/

👩‍💻Github Code: https://github.com/sagarshende23/shared_preference_flutter

#shared #flutter #shared preferences flutter #shared preferences

CodingNepal .

CodingNepal .

1617797839

Popup Share Modal UI Design using HTML CSS & JavaScript

#css share modal #modal dialog box #popup share modal #share modal #share modal in javascript