Giter Site home page Giter Site logo

bingchat-api's Introduction

👋 Hello, I'm Tuhin

⚡ Tech Stack

  • Javascript/Typescript
  • NodeJS
  • React
  • Next
  • Flutter
  • MongoDB
  • Firebase (Cloud Firestore, RTDB etc.)
  • Prisma
  • MySql
  • REST
  • GraphQL
  • Python
  • Serverless Architecture
  • Gatsby
  • Telegraf
  • Git
  • AWS | GCP
  • Docker
  • Linux

⚡ Project Stack

and More

⚡ Github Stat

Stats
Fun fact, I made this 🤓

⚡ Connect

⚡ Contact

bingchat-api's People

Contributors

tuhinpal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bingchat-api's Issues

”unauthorized request" and "chathub not authorized".

I used the signature in the X-Sydney-Encryptedconversationsignature header from the create conversation response, URL-encoded it, and passed it as the sec_access_token to the chathub interface, but the chathub still returns "unauthorized request" and "chathub not authorized".

error in npm build


C:\Users\hellx\bingchat-api> npm run build

> [email protected] build
> tsc

src/handlers/create-conversation.ts:2:35 - error TS2307: Cannot find module 'express' or its corresponding type declarations.

2 import { Request, Response } from "express";
                                    ~~~~~~~~~

src/handlers/generate-test.ts:1:35 - error TS2307: Cannot find module 'express' or its corresponding type declarations.

1 import { Request, Response } from "express";
                                    ~~~~~~~~~

src/handlers/generate.ts:1:23 - error TS2307: Cannot find module 'ws' or its corresponding type declarations.

1 import WebSocket from "ws";
                        ~~~~

src/handlers/generate.ts:16:35 - error TS2307: Cannot find module 'express' or its corresponding type declarations.

16 import { Request, Response } from "express";
                                     ~~~~~~~~~

src/handlers/generate.ts:50:20 - error TS2503: Cannot find namespace 'NodeJS'.

50       let timeout: NodeJS.Timeout | undefined = setTimeout(() => {
                      ~~~~~~

src/handlers/generate.ts:101:25 - error TS7006: Parameter 'message' implicitly has an 'any' type.

101       ws.on("message", (message) => {
                            ~~~~~~~

src/handlers/set-cookie.ts:1:35 - error TS2307: Cannot find module 'express' or its corresponding type declarations.

1 import { Request, Response } from "express";
                                    ~~~~~~~~~

src/handlers/set-cookie.ts:2:16 - error TS2307: Cannot find module 'fs' or its corresponding type declarations.

2 import fs from "fs";
                 ~~~~

src/index.ts:1:21 - error TS2307: Cannot find module 'express' or its corresponding type declarations.

1 import express from "express";
                      ~~~~~~~~~

src/index.ts:2:18 - error TS2307: Cannot find module 'cors' or its corresponding type declarations.

2 import cors from "cors";
                   ~~~~~~

src/index.ts:17:14 - error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.

17 const port = process.env.PORT || 8080;
                ~~~~~~~

src/utils/axios-instance.ts:1:19 - error TS2307: Cannot find module 'axios' or its corresponding type declarations.

1 import axios from "axios";
                    ~~~~~~~

src/utils/axios-instance.ts:2:16 - error TS2307: Cannot find module 'fs' or its corresponding type declarations.

2 import fs from "fs";
                 ~~~~

src/utils/invocationId.ts:1:16 - error TS2307: Cannot find module 'fs' or its corresponding type declarations.

1 import fs from "fs";
                 ~~~~


Found 14 errors in 7 files.

Errors  Files
     1  src/handlers/create-conversation.ts:2
     1  src/handlers/generate-test.ts:1
     4  src/handlers/generate.ts:1
     2  src/handlers/set-cookie.ts:1
     3  src/index.ts:1
     2  src/utils/axios-instance.ts:1
     1  src/utils/invocationId.ts:1

Localhost not reachable

firstly I am no networking expert. I pasted the code into the console and replaced my URL and got this err:

const cookie = document.cookie;
const serverUrl = "http://192.168.110.20:8080";

fetch(`${serverUrl}/set-cookie`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ cookie }),
})
  .then((res) => res.json())
  .then((res) => console.log(res))
  .catch((err) => console.log(err));
Mixed Content: The page at 'https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx' was loaded over HTTPS, but requested an insecure resource 'http://192.168.110.20:8080/set-cookie'. This request has been blocked; the content must be served over HTTPS.

get the code

hi where is get this code from this :

So, you should have beta access. After deployment login to that bing account and open developer console. Then paste the code (replace your serverUrl).

i have been get beta bing chat

error when pasted into console

Got this error when pasted into console

const cookie = document.cookie;
const serverUrl = "http://192.168.110.20:8080";

fetch(`${serverUrl}/set-cookie`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ cookie }),
})
  .then((res) => res.json())
  .then((res) => console.log(res))
  .catch((err) => console.log(err));
Mixed Content: The page at 'https://www.bing.com/search?q=Bing+AI&showconv=1&FORM=hpcodx' was loaded over HTTPS, but requested an insecure resource 'http://192.168.110.20:8080/set-cookie'. This request has been blocked; the content must be served over HTTPS.

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.