diff --git a/app/client/api.ts b/app/client/api.ts
index fb829f9..51db34f 100644
--- a/app/client/api.ts
+++ b/app/client/api.ts
@@ -54,41 +54,6 @@ export class ClientApi {
prompts() {}
masks() {}
-
- async share(messages: ChatMessage[], avatarUrl: string | null = null) {
- const msgs = messages
- .map((m) => ({
- from: m.role === "user" ? "human" : "gpt",
- value: m.content,
- }))
- .concat([
- {
- from: "human",
- value:
- "Share from [ChatGPT Next Web]: https://github.com/Yidadaa/ChatGPT-Next-Web",
- },
- ]);
- // 敬告二开开发者们,为了开源大模型的发展,请不要修改上述消息,此消息用于后续数据清洗使用
- // Please do not modify this message
-
- console.log("[Share]", msgs);
- const res = await fetch("/sharegpt", {
- body: JSON.stringify({
- avatarUrl,
- items: msgs,
- }),
- headers: {
- "Content-Type": "application/json",
- },
- method: "POST",
- });
-
- const resJson = await res.json();
- console.log("[Share]", resJson);
- if (resJson.id) {
- return `https://shareg.pt/${resJson.id}`;
- }
- }
}
export const api = new ClientApi();
diff --git a/app/components/exporter.tsx b/app/components/exporter.tsx
index 10d5af9..f699d77 100644
--- a/app/components/exporter.tsx
+++ b/app/components/exporter.tsx
@@ -272,21 +272,6 @@ export function PreviewActions(props: {
const onRenderMsgs = (msgs: ChatMessage[]) => {
setShouldExport(false);
-
- api
- .share(msgs)
- .then((res) => {
- if (!res) return;
- copyToClipboard(res);
- setTimeout(() => {
- window.open(res, "_blank");
- }, 800);
- })
- .catch((e) => {
- console.error("[Share]", e);
- showToast(prettyObject(e));
- })
- .finally(() => setLoading(false));
};
const share = async () => {
@@ -315,13 +300,6 @@ export function PreviewActions(props: {
icon={