{"id":23305946,"url":"https://github.com/integration-automation/recopilot","last_synced_at":"2025-10-28T06:30:56.033Z","repository":{"id":268469333,"uuid":"904442588","full_name":"Integration-Automation/ReCopilot","owner":"Integration-Automation","description":"Microsoft's Bing Chat AI","archived":false,"fork":false,"pushed_at":"2024-12-16T23:50:48.000Z","size":153,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T21:17:28.983Z","etag":null,"topics":["bing","bing-chat","bing-gpt","binggpt","copilot","copilot-chat","freegpt","gpt4free","gpt4o"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Integration-Automation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-16T22:36:57.000Z","updated_at":"2025-01-30T16:44:45.000Z","dependencies_parsed_at":"2024-12-17T00:55:07.156Z","dependency_job_id":"1a91fff1-3d55-431e-aade-8eb192baf2d1","html_url":"https://github.com/Integration-Automation/ReCopilot","commit_stats":null,"previous_names":["integration-automation/recopilot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-Automation%2FReCopilot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-Automation%2FReCopilot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-Automation%2FReCopilot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Integration-Automation%2FReCopilot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Integration-Automation","download_url":"https://codeload.github.com/Integration-Automation/ReCopilot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238603647,"owners_count":19499490,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bing","bing-chat","bing-gpt","binggpt","copilot","copilot-chat","freegpt","gpt4free","gpt4o"],"created_at":"2024-12-20T12:14:41.503Z","updated_at":"2025-10-28T06:30:50.732Z","avatar_url":"https://github.com/Integration-Automation.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Setup\n\n\u003csummary\u003e\n\n\u003cdetails open\u003e\n\n## Install package\n\n```bash\npython3 -m pip install re_copilot --upgrade\n```\n## Requirements\n\n- python 3.9+\n- A Microsoft Account with access to \u003chttps://bing.com/chat\u003e (Optional, depending on your region)\n- Required in a supported country or region with New Bing (Chinese mainland VPN required)\n\n\u003c/details\u003e\n\u003c/summary\u003e\n\n## Authentication\n\n\u003cdetails open\u003e\n\n### Collect cookies\n\n- a) (Easy) Install the latest version of Microsoft Edge\n- b) (Advanced) Alternatively, you can use any browser and set the user-agent to look like you're using Edge (e.g., `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.51`). You can do this easily with an extension like \"User-Agent Switcher and Manager\" for [Chrome](https://chrome.google.com/webstore/detail/user-agent-switcher-and-m/bhchdcejhohfmigjafbampogmaanbfkg) and [Firefox](https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/).\n\n1. Get a browser that looks like Microsoft Edge.\n2. Open [bing.com/chat](https://copilot.microsoft.com/chats)\n3. If you see a chat feature, you are good to continue...\n4. Install the cookie editor extension for [Chrome](https://chrome.google.com/webstore/detail/cookie-editor/hlkenndednhfkekhgcdicdfddnkalmdm) or [Firefox](https://addons.mozilla.org/en-US/firefox/addon/cookie-editor/)\n5. Go to [bing.com/chat](https://copilot.microsoft.com/chats)\n6. Open the extension\n7. Click \"Export\" on the bottom right, then \"Export as JSON\" (This saves your cookies to clipboard)\n8. Paste your cookies into a file `bing_cookies.json`.\n   - NOTE: The **cookies file name MUST follow the regex pattern `bing_cookies.json`**, so that they could be recognized by internal cookie processing mechanisms\n\n### Collect JWT Token\n\n1. Open Edge (make sure you already enable developer tools)\n2. Go to [bing.com/chat](https://copilot.microsoft.com/chats\n3. Press F12 to open developer tools\n4. Switch to network tab\n5. Press Ctrl + F on developer tool window to search\n6. Search authorization and find request header that include authorization\n\n![Requests header that include authorization](/images/request_that_include_jwt.png)\n\n7. Copy all JWT token string after Bearer\n\n![JWT Token](/images/jwt_token.png)\n\n\u003c/details\u003e\n\n## Example\n\n![Run example](/images/run_example.png)\n\n\u003cdetails open\u003e\n\n```python\nimport asyncio\nimport json\nfrom pathlib import Path\n\nfrom re_copilot import chat\n\n\nasync def main(jwt_token: str, cookies: list[dict], chat_text: str, reset_conversation: bool):\n    bot_response = await chat(jwt_token=jwt_token, cookies=cookies, chat_text=chat_text,\n                              reset_conversation=reset_conversation)\n    print(bot_response)\n\n\nif __name__ == \"__main__\":\n    your_jwt_token = \"\"\n    jwt_token = f\"{your_jwt_token}\"\n    cookies: list[dict] = json.loads(open(\n        str(Path(str(Path.cwd()) + \"/bing_cookies.json\")), encoding=\"utf-8\").read())\n    try:\n        loop = asyncio.get_running_loop()\n    except RuntimeError:\n        loop = asyncio.get_event_loop()\n    loop.run_until_complete(\n        main(jwt_token=jwt_token, cookies=cookies, chat_text=\"Introduction yourself\", reset_conversation=True))\n```\n\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegration-automation%2Frecopilot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintegration-automation%2Frecopilot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintegration-automation%2Frecopilot/lists"}