ReEdgeGPT
Microsoft's Bing Chat AI
Stars: 141
ReEdgeGPT is a tool designed for reverse engineering the chat feature of the new version of Bing. It provides documentation and guidance on how to collect and use cookies to access the chat feature. The tool allows users to create a chatbot using the collected cookies and interact with the Bing GPT chatbot. It also offers support for different modes like Copilot and Bing, along with plugins for various tasks. The tool covers historical information about Rome, the Lazio region, and provides troubleshooting tips for common issues encountered while using the tool.
README:
The reverse engineering the chat feature of the new version of Bing
If you have any problem watch bottom Q&A first.
python3 -m pip install re_edge_gpt --upgrade
- python 3.9+
- A Microsoft Account with access to https://bing.com/chat (Optional, depending on your region)
- Required in a supported country or region with New Bing (Chinese mainland VPN required)
!!! POSSIBLY NOT REQUIRED ANYMORE !!!
In some regions, Microsoft has made the chat feature available to everyone, so you might be able to skip this step. You can check this with a browser (with user-agent set to reflect Edge), by trying to start a chat without logging in.
It was also found that it might depend on your IP address. For example, if you try to access the chat features from an IP that is known to belong to a datacenter range (vServers, root servers, VPN, common proxies, ...), you might be required to log in while being able to access the features just fine from your home IP address.
If you receive the following error, you can try providing a cookie and see if it works then:
Exception: Authentication failed. You have not been accepted into the beta.
- a) (Easy) Install the latest version of Microsoft Edge
- 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 and Firefox.
- Get a browser that looks like Microsoft Edge.
- Open bing.com/chat
- If you see a chat feature, you are good to continue...
- Install the cookie editor extension for Chrome or Firefox
- Go to bing.com/chat
- Open the extension
- Click "Export" on the bottom right, then "Export as JSON" (This saves your cookies to clipboard)
- Paste your cookies into a file
bing_cookies.json
.- NOTE: The cookies file name MUST follow the regex pattern
bing_cookies.json
, so that they could be recognized by internal cookie processing mechanisms
- NOTE: The cookies file name MUST follow the regex pattern
import json
from re_edge_gpt import Chatbot
async def create_bot():
cookies = json.loads(open("./path/to/bing_cookies.json", encoding="utf-8").read())
bot = await Chatbot.create(cookies=cookies)
return bot
$ python3 -m re_edge_gpt -h
ReEdgeGPT - A demo of reverse engineering the Bing GPT chatbot
!help for help
Type !exit to exit
usage: __main__.py [-h] [--enter-once] [--search-result] [--no-stream] [--rich] [--proxy PROXY] [--wss-link WSS_LINK]
[--style {creative,balanced,precise}] [--prompt PROMPT] [--cookie-file COOKIE_FILE]
[--history-file HISTORY_FILE] [--locale LOCALE]
options:
-h, --help show this help message and exit
--enter-once
--search-result
--no-stream
--rich
--proxy PROXY Proxy URL (e.g. socks5://127.0.0.1:1080)
--wss-link WSS_LINK WSS URL(e.g. wss://sydney.bing.com/sydney/ChatHub)
--style {creative,balanced,precise}
--prompt PROMPT prompt to start with
--cookie-file COOKIE_FILE
path to cookie file
--history-file HISTORY_FILE
path to history file
--locale LOCALE your locale (e.g. en-US, zh-CN, en-IE, en-GB)
(China/US/UK/Norway has enhanced support for locale)
Use Async for the best experience, for example:
import asyncio
import json
from pathlib import Path
from re_edge_gpt import Chatbot
from re_edge_gpt import ConversationStyle
# If you are using jupyter pls install this package
# from nest_asyncio import apply
async def test_ask() -> None:
bot = None
try:
cookies = json.loads(open(
str(Path(str(Path.cwd()) + "/bing_cookies.json")), encoding="utf-8").read())
bot = await Chatbot.create(cookies=cookies)
response = await bot.ask(
prompt="How to boil the egg",
conversation_style=ConversationStyle.balanced,
simplify_response=True
)
# If you are using non ascii char you need set ensure_ascii=False
print(json.dumps(response, indent=2, ensure_ascii=False))
# Raw response
# print(response)
assert response
except Exception as error:
raise error
finally:
if bot is not None:
await bot.close()
if __name__ == "__main__":
# If you are using jupyter pls use nest_asyncio apply()
# apply()
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.get_event_loop()
loop.run_until_complete(test_ask())
- a) (Easy) Install the latest version of Microsoft Edge
- 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 and Firefox.
- Get a browser that looks like Microsoft Edge.
- Open copilot.microsoft.com
- If you see a chat feature, you are good to continue...
- Install the cookie editor extension for Chrome or Firefox
- Go to copilot.microsoft.com)
- Open the extension
- Click "Export" on the bottom right, then "Export as JSON" (This saves your cookies to clipboard)
- Paste your cookies into a file
copilot_cookies.json
.- NOTE: The cookies file name MUST follow the regex pattern
copilot_cookies.json
, so that they could be recognized by internal cookie processing mechanisms
- NOTE: The cookies file name MUST follow the regex pattern
import asyncio
import json
from pathlib import Path
from re_edge_gpt import Chatbot
from re_edge_gpt import ConversationStyle
# If you are using jupyter pls install this package
# from nest_asyncio import apply
async def test_ask() -> None:
bot = None
try:
mode = "Copilot"
if mode == "Bing":
cookies: list[dict] = json.loads(open(
str(Path(str(Path.cwd()) + "/bing_cookies.json")), encoding="utf-8").read())
else:
cookies: list[dict] = json.loads(open(
str(Path(str(Path.cwd()) + "/copilot_cookies.json")), encoding="utf-8").read())
# Notice when mode != "Bing" (Bing is default) will set mode is copilot
bot = await Chatbot.create(cookies=cookies, mode=mode)
response = await bot.ask(
prompt="Is your name Copilot",
conversation_style=ConversationStyle.balanced,
simplify_response=True
)
# If you are using non ascii char you need set ensure_ascii=False
print(json.dumps(response, indent=2, ensure_ascii=False))
# Raw response
# print(response)
assert response
except Exception as error:
raise error
finally:
if bot is not None:
await bot.close()
if __name__ == "__main__":
# If you are using jupyter pls use nest_asyncio apply()
# apply()
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.get_event_loop()
loop.run_until_complete(test_ask())
- Go to https://bing.com/
- F12 to open console
- In the JavaScript console, type cookieStore.get("_U").then(result => console.log(result.value)) and press enter
- Copy the output. This is used in --U or auth_cookie.
- Go to https://bing.com/.
- F12 to open developer tools
- navigate to the storage tab
- expand the cookies tab
- click on the https://bing.com cookie
- copy the value from the _U
import os
import shutil
from pathlib import Path
from re_edge_gpt import ImageGen, ImageGenAsync
# create a temporary output directory for testing purposes
test_output_dir = "test_output"
# download a test image
test_image_url = "https://picsum.photos/200"
auth_cooker = open("bing_cookies.txt", "r+").read()
sync_gen = ImageGen(auth_cookie=auth_cooker)
async_gen = ImageGenAsync(auth_cookie=auth_cooker)
def test_save_images_sync():
sync_gen.save_images([test_image_url], test_output_dir)
sync_gen.save_images([test_image_url], test_output_dir, file_name="test_image")
# check if the image was downloaded and saved correctly
assert os.path.exists(os.path.join(test_output_dir, "test_image_0.jpeg"))
assert os.path.exists(os.path.join(test_output_dir, "0.jpeg"))
# Generate image list sync
def test_generate_image_sync():
image_list = sync_gen.get_images("tree")
print(image_list)
if __name__ == "__main__":
# Make dir to save image
Path("test_output").mkdir(exist_ok=True)
# Save image
test_save_images_sync()
# Generate image sync
test_generate_image_sync()
# Remove dir
shutil.rmtree(test_output_dir)
https://github.com/Integration-Automation/ReEdgeGPT/issues/119
Example:
import asyncio
import json
from pathlib import Path
from random import choice
from string import ascii_uppercase
from re_edge_gpt import Chatbot
from re_edge_gpt import ConversationStyle
# If you are using jupyter pls install this package
# from nest_asyncio import apply
async def test_ask() -> None:
bot = None
try:
cookies: list[dict] = json.loads(open(
str(Path(str(Path.cwd()) + "/bing_cookies.json")), encoding="utf-8").read())
bot = await Chatbot.create(cookies=cookies, mode="Bing", plugin_ids=["c310c353-b9f0-4d76-ab0d-1dd5e979cf68"])
prompt = """Rome (Italian and Latin: Roma, Italian: [ˈroːma] ⓘ) is the capital city of Italy. It is also the capital of the Lazio region, the centre of the Metropolitan City of Rome Capital, and a special comune (municipality) named Comune di Roma Capitale. With 2,860,009 residents in 1,285 km2 (496.1 sq mi),[2] Rome is the country's most populated comune and the third most populous city in the European Union by population within city limits. The Metropolitan City of Rome, with a population of 4,355,725 residents, is the most populous metropolitan city in Italy.[3] Its metropolitan area is the third-most populous within Italy.[5] Rome is located in the central-western portion of the Italian Peninsula, within Lazio (Latium), along the shores of the Tiber. Vatican City (the smallest country in the world)[6] is an independent country inside the city boundaries of Rome, the only existing example of a country within a city. Rome is often referred to as the City of Seven Hills due to its geographic location, and also as the "Eternal City". Rome is generally considered to be the cradle of Western civilization and Western Christian culture, and the centre of the Catholic Church.[7][8][9]
Rome's history spans 28 centuries. While Roman mythology dates the founding of Rome at around 753 BC, the site has been inhabited for much longer, making it a major human settlement for almost three millennia and one of the oldest continuously occupied cities in Europe.[10] The city's early population originated from a mix of Latins, Etruscans, and Sabines. Eventually, the city successively became the capital of the Roman Kingdom, the Roman Republic and the Roman Empire, and is regarded by many as the first-ever Imperial city and metropolis.[11] It was first called The Eternal City (Latin: Urbs Aeterna; Italian: La Città Eterna) by the Roman poet Tibullus in the 1st century BC, and the expression was also taken up by Ovid, Virgil, and Livy.[12][13] Rome is also called "Caput Mundi" (Capital of the World).
After the fall of the Empire in the west, which marked the beginning of the Middle Ages, Rome slowly fell under the political control of the Papacy, and in the 8th century, it became the capital of the Papal States, which lasted until 1870. Beginning with the Renaissance, almost all popes since Nicholas V (1447–1455) pursued a coherent architectural and urban programme over four hundred years, aimed at making the city the artistic and cultural centre of the world.[14] In this way, Rome first became one of the major centres of the Renaissance[15] and then became the birthplace of both the Baroque style and Neoclassicism. Famous artists, painters, sculptors, and architects made Rome the centre of their activity, creating masterpieces throughout the city. In 1871, Rome became the capital of the Kingdom of Italy, which, in 1946, became the Italian Republic.
In 2019, Rome was the 14th most visited city in the world, with 8.6 million tourists, the third most visited city in the European Union, and the most popular tourist destination in Italy.[16] Its historic centre is listed by UNESCO as a World Heritage Site.[17] The host city for the 1960 Summer Olympics, Rome is also the seat of several specialised agencies of the United Nations, such as the Food and Agriculture Organization (FAO), the World Food Programme (WFP) and the International Fund for Agricultural Development (IFAD). The city also hosts the Secretariat of the Parliamentary Assembly of the Union for the Mediterranean[18] (UfM) as well as the headquarters of many multinational companies, such as Eni, Enel, TIM, Leonardo, and banks such as BNL. Numerous companies are based within Rome's EUR business district, such as the luxury fashion house Fendi located in the Palazzo della Civiltà Italiana. The presence of renowned international brands in the city has made Rome an important centre of fashion and design, and the Cinecittà Studios have been the set of many Academy Award–winning movies.[19]
Name and symbol
Etymology
According to the Ancient Romans' founding myth,[20] the name Roma came from the city's founder and first king, Romulus.[1]
However, it is possible that the name Romulus was actually derived from Rome itself.[21] As early as the 4th century, there have been alternative theories proposed on the origin of the name Roma. Several hypotheses have been advanced focusing on its linguistic roots which however remain uncertain:[22]
From Rumon or Rumen, archaic name of the Tiber, which in turn is supposedly related to the Greek verb ῥέω (rhéō) 'to flow, stream' and the Latin verb ruō 'to hurry, rush';[b]
From the Etruscan word 𐌓𐌖𐌌𐌀 (ruma), whose root is *rum- "teat", with possible reference either to the totem wolf that adopted and suckled the cognately named twins Romulus and Remus, or to the shape of the Palatine and Aventine Hills;
From the Greek word ῥώμη (rhṓmē), which means strength.[c]
Other names and symbols
Rome has also been called in ancient times simply "Urbs" (central city),[23] from urbs roma, or identified with its ancient Roman initialism of SPQR, the symbol of Rome's constituted republican government. Furthermore, Rome has been called Urbs Aeterna (The Eternal City), Caput Mundi (The Capital of the world), Throne of St. Peter and Roma Capitale.
History
Main article: History of Rome
For a chronological guide, see Timeline of Rome.
Lazio (UK: /ˈlætsioʊ/ LAT-see-oh, US: /ˈlɑːt-/ LAHT-, Italian: [ˈlattsjo]) or Latium (/ˈleɪʃiəm/ LAY-shee-əm, US also /-ʃəm/ -shəm;[4][5][6][7] from the original Latin name, pronounced [ˈɫati.ũː]) is one of the 20 administrative regions of Italy. Situated in the central peninsular section of the country, it has 5,714,882 inhabitants and a GDP of more than €197 billion per year, making it the country's second most populated region[1] and second largest regional economy after Lombardy. The capital of Lazio is Rome, which is also the capital and largest city of Italy.
Lazio is rich in a multi-millennial heritage: it sees the presence of the Etruscan civilization, then at the center of the Roman Empire, of the Holy Roman Empire, then of the Papal States, of the First French Empire and of the Italian Republic. The historical, artistic, cultural, architectural, archaeological and religious heritage of Lazio is immensely vast and rich in cultural diversity. Some of the greatest artists and historical figures lived and worked in Rome, such as Bramante, Raffaello Sanzio, Filippo Brunelleschi, Donatello, Michelangelo, Gian Lorenzo Bernini, Leonardo da Vinci, Francesco Borromini, Pietro da Cortona, Johann Wolfgang von Goethe, Rubens, Van Dyck and Diego Velázquez.
Today it constitutes a dynamic region. Lazio is a large center of services and international trade, industry, public services and tourism, supported by a privileged transport network thanks to its geographical position in the center of Italy and the presence of Rome within it.
Geography
Relief map of Lazio
Panorama of the Aniene Valley
Lazio comprises a land area of 17,242 km2 (6,657 sq mi) and it has borders with Tuscany, Umbria, and Marche to the north, Abruzzo and Molise to the east, Campania to the south, and the Tyrrhenian Sea to the west. The region is mainly flat, with small mountainous areas in the most eastern and southern districts.
The coast of Lazio is mainly composed of sandy beaches, punctuated by the headlands of Cape Circeo (541 m) and Gaeta (171 m). The Pontine Islands, which are part of Lazio, are off Lazio's southern coast. Behind the coastal strip, to the north, lies the Maremma Laziale (the continuation of the Tuscan Maremma), a coastal plain interrupted at Civitavecchia by the Tolfa Mountains (616 m). The central section of the region is occupied by the Roman Campagna, a vast alluvial plain surrounding the city of Rome, with an area of approximately 2,100 km2 (811 sq mi). The southern districts are characterized by the flatlands of Agro Pontino, a once swampy and malarial area, that was reclaimed over the centuries.
The Preapennines of Latium, marked by the Tiber valley and the Liri with the Sacco tributary, include on the right of the Tiber, three groups of mountains of volcanic origin: the Volsini, Cimini and Sabatini, whose largest former craters are occupied by the Bolsena, Vico and Bracciano lakes. To the south of the Tiber, other mountain groups form part of the Preapennines: the Alban Hills, also of volcanic origin, and the calcareous Lepini, Ausoni and Aurunci Mountains. The Apennines of Latium are a continuation of the Apennines of Abruzzo: the Reatini Mountains with Terminillo (2,213 m), Mounts Sabini, Prenestini, Simbruini and Ernici which continue east of the Liri into the Mainarde Mountains. The highest peak is Mount Gorzano (2,458 m) on the border with Abruzzo.
Climate
The region's climate, monitored by several dozen meteorological stations (many of which managed by the Lazio Regional Hydrographic and Mareographic Office), shows considerable variability from area to area. In general, along the coast, there is a mediterranean climate, the temperature values vary between 9–10°C (48–50°F) in January and 24–25°C (75–77°F) in July. Towards the interior, the climate is more continental and, on the hills, winters are cold and at night, temperatures can be quite frigid.
With particular regard to the sunshine duration, it should also be noted that, among the regional capital cities in Italy, Rome is the one with the highest number of hours of sunshine and days with clear skies during the year.
History
For the history of ancient Lazio, see Latium.
See also: List of museums in Lazio
The Appian Way (Via Appia), a road connecting Ancient Rome to the southern parts of Italy, remains usable even today.
The Italian word Lazio descends from the Latin word Latium, the region of the Latins, Latini in the Latin language spoken by them and passed on to the Latin city-state of Ancient Rome. Although the demography of ancient Rome was multi-ethnic, including, for example, Etruscans, Sabines and other Italics besides the Latini, the latter were the dominant constituent. In Roman mythology, the tribe of the Latini took their name from King Latinus. Apart from the mythical derivation of Lazio given by the ancients as the place where Saturn, ruler of the golden age in Latium, hid (latuisset)[8] from Jupiter there,[9] a major modern etymology is that Lazio comes from the Latin word "latus", meaning "wide",[10] expressing the idea of "flat land" meaning the Roman Campagna. Much of Lazio is in fact flat or rolling. The lands originally inhabited by the Latini were extended into the territories of the Samnites, the Marsi, the Hernici, the Aequi, the Aurunci and the Volsci, all surrounding Italic tribes. This larger territory was still called Latium, but it was divided into Latium adiectum or Latium Novum, the added lands or New Latium, and Latium Vetus, or Old Latium, the older, smaller region. The northern border of Lazio was the Tiber river, which divided it from Etruria.
The emperor Augustus officially united almost all of present-day Italy into a single geo-political entity, Italia, dividing it into eleven regions. The part of today's Lazio south of the Tiber river – together with the present region of Campania immediately to the southeast of Lazio and the seat of Neapolis – became Region I (Latium et Campania), while modern Upper Lazio became part of Regio VII – Etruria, and today's Province of Rieti joined Regio IV – Samnium.
After the Gothic conquest of Italy at the end of the fifth century, modern Lazio became part of the Ostrogothic Kingdom, but after the Gothic War between 535 and 554 and conquest by the Byzantine Empire, the region became the property of the Eastern Emperor as the Duchy of Rome. However, the long wars against the Longobards weakened the region. With the Donation of Sutri in 728, the Pope acquired the first territory in the region beyond the Duchy of Rome.
The strengthening of the religious and ecclesiastical aristocracy led to continuous power struggles between secular lords (Baroni) and the Pope until the middle of the 16th century. Innocent III tried to strengthen his own territorial power, wishing to assert his authority in the provincial administrations of Tuscia, Campagna and Marittima through the Church's representatives, in order to reduce the power of the Colonna family. Other popes tried to do the same. During the period when the papacy resided in Avignon, France (1309–1377), the feudal lords' power increased due to the absence of the Pope from Rome. Small communes, and Rome above all, opposed the lords' increasing power, and with Cola di Rienzo, they tried to present themselves as antagonists of the ecclesiastical power. However, between 1353 and 1367, the papacy regained control of Lazio and the rest of the Papal States. From the middle of the 16th century, the papacy politically unified Lazio with the Papal States,[11] so that these territories became provincial administrations of St. Peter's estate; governors in Viterbo, in Marittima and Campagna, and in Frosinone administered them for the papacy.
Lazio was part of the short-lived Roman Republic, after which it became a puppet state of the First French Republic under the forces of Napoleon Bonaparte. Lazio was returned to the Papal States in October 1799. In 1809, it was annexed to the French Empire under the name of the Department of Tibre, but returned to the Pope's control in 1815.
On 20 September 1870 the capture of Rome, during the reign of Pope Pius IX, and France's defeat at Sedan, completed Italian unification, and Lazio was incorporated into the Kingdom of Italy. In 1927, the territory of the Province of Rieti, belonging to Umbria and Abruzzo, joined Lazio. Towns in Lazio were devastated by the 2016 Central Italy earthquake.[12]"""
print(f"prompt len is: {len(prompt)}")
response = await bot.ask(
prompt=prompt,
conversation_style=ConversationStyle.balanced,
simplify_response=True
)
# If you are using non ascii char you need set ensure_ascii=False
print(json.dumps(response, indent=2, ensure_ascii=False))
except Exception as error:
raise error
finally:
if bot is not None:
await bot.close()
if __name__ == "__main__":
# If you are using jupyter pls use nest_asyncio apply()
# apply()
try:
loop = asyncio.get_running_loop()
except RuntimeError:
loop = asyncio.get_event_loop()
loop.run_until_complete(test_ask())
Result:
prompt len is: 13833
{
"text": "**Rome**, the **Eternal City**, has a rich and storied history that spans **28 centuries**. While Roman mythology traces its founding to around **753 BC**, archaeological evidence suggests that the site has been inhabited for much longer, making it one of the **oldest continuously occupied cities in Europe**. Let's delve into some key aspects of Rome's fascinating past:\n\n1. **Early Rome and Mythical Origins**:\n - Rome began as an **Iron Age hut village** founded in the mid-8th century BC.\n - According to legend, **Romulus** was the city's founder and first king.\n - The early population of Rome consisted of a mix of **Latins, Etruscans, and Sabines**.\n\n2. **Roman Republic and Empire**:\n - Rome transitioned from a monarchy to a **Republic** in 509 BC.\n - During the **Punic Wars**, Rome gained dominance over the Western Mediterranean, displacing Carthage.\n - The **Roman Empire** followed the Republic, reaching its peak under **Caesar** and **Augustus**.\n - The Western Roman Empire collapsed in 476 AD.\n\n3. **Medieval Rome and Papal Control**:\n - After the fall of the Western Empire, Rome fell under the **Papacy's political control**.\n - It became the capital of the **Papal States** until 1870.\n - The Renaissance era saw Rome as a major center of art and culture.\n\n4. **Modern Rome**:\n - In 1871, Rome became the capital of the **Kingdom of Italy**.\n - Today, it is a vibrant city, attracting millions of tourists annually.\n - Rome's historic center is a **UNESCO World Heritage Site**.\n\n5. **Lazio Region**:\n - **Lazio**, also known as **Latium**, is one of Italy's administrative regions.\n - It has a rich heritage, including the **Etruscan civilization** and the **Roman Empire**.\n - Lazio's capital is **Rome**, which remains a hub of art, culture, and history.\n\n6. **Geography**:\n - Lazio comprises a land area of **17,242 km2** and borders Tuscany, Umbria, Marche, Abruzzo, Molise, and Campania.\n - The region features a mix of flatlands, coastal areas, and mountain ranges.\n\n7. **Climate**:\n - Lazio's climate varies, with a **Mediterranean climate** along the coast.\n - Rome enjoys the highest number of **sunshine hours** among Italian capital cities.\n\nIn summary, Rome's legacy as the **Eternal City** continues to captivate visitors, and its historical significance reverberates across art, culture, and civilization. 🏛️🌟 \n Generating answers for you... \n {\"web_search_results\":[{\"title\":\"History of Rome - Wikipedia\",\"snippets\":[\"History of Rome - Wikipedia History of Rome Historical nation-states Roman Kingdom 753–509 BC Roman Republic 509–27 BC Roman Empire 27 BC – 395 AD Western Roman Empire 286–476 Kingdom of Italy 476–493 Ostrogothic Kingdom 493–536 Eastern Roman Empire 536–546 Ostrogothic Kingdom 546–547 Eastern Roman Empire 547–549 Ostrogothic Kingdom 549–552 Eastern Roman Empire 552–751 Kingdom of the Lombards 751–756 Papal States 756–1798 Roman Republic 1798–1799 Papal States 1799–1809 First French Empire 1809–1814 Papal States 1814–1849 Roman Republic 1849 Papal States 1849–1870 Kingdom of Italy 1870–1943 Italian Social Republic 1943–1944 Kingdom of Italy 1944–1946 Italian Republic 1946–present Rome: Ruins of the Forum, Looking towards the Capitol (1742) by Canaletto The history of Rome includes the history of the city of Rome as well as the civilisation of ancient Rome. Roman history has been influential on the modern world, especially in the history of the Catholic Church, and Roman law has influenced many modern legal systems. Roman history can be divided into the following periods: Pre-historical and early Rome, covering Rome's earliest inhabitants and the legend of its founding by Romulus The period of Etruscan dominance and the regal period, in which, according to tradition, Romulus was the first of seven kings The Roman Republic, which commenced in 509 BC when kings were replaced with rule by elected magistrates. The period was marked by vast expansion of Roman territory. During the 5th century BC, Rome gained regional dominance in Latium. With the Punic Wars from 264 to 146 BC, ancient Rome gained dominance over the Western Mediterranean, displacing Carthage as the dominant regional power. The Roman Empire followed the Republic, which waned with the rise of Julius Caesar, and by all measures concluded after a period of civil war and the victory of Caesar's adopted son, Octavian, in 27 BC over Mark Antony. The Western Roman Empire collapsed in 476 after the city was conquered by the Ostrogothic Kingdom. Consequently Rome's power declined, and it eventually became part of the Eastern Roman Empire, as the Duchy of Rome, from the 6th to 8th centuries. At this time, the city was reduced to a fraction of its former size, being sacked several times in the 5th to 6th centuries, even temporarily depopulated entirely. [1] Medieval Rome is characterized by a break with Constantinople and the formation of the Papal States. The Papacy struggled to retain influence in the emerging Holy Roman Empire, and during the saeculum obscurum, the population of Rome fell to as low as 30,000 inhabitants. Following the East–West Schism and the limited success in the Investiture Controversy, the Papacy did gain considerable influence in the High Middle Ages, but with the Avignon Papacy and the Western Schism, the city of Rome was reduced to irrelevance, its population falling below 20,000. Rome's decline into complete irrelevance during the medieval period, with the associated lack of construction activity, assured the survival of very significant ancient Roman material remains in the centre of the city, some abandoned and others continuing in use.\",\"Roman history can be divided into the following periods: Pre-historical and early Rome, covering Rome's earliest inhabitants and the legend of its founding by Romulus The period of Etruscan dominance and the regal period, in which, according to tradition, Romulus was the first of seven... The Roman ...\"],\"url\":\"https://en.wikipedia.org/wiki/History_of_Rome\"},{\"title\":\"Rome - Wikipedia\",\"snippets\":[\"Rome's history spans 28 centuries. While Roman mythology dates the founding of Rome at around 753 BC, the site has been inhabited for much longer, making it a major human settlement for almost three millennia and one of the oldest continuously occupied cities in Europe. \"],\"url\":\"https://en.wikipedia.org/wiki/Rome\"},{\"title\":\"History of Ancient Rome: When was Rome Founded\",\"snippets\":[\"Rome began as an Iron Age hut village, founded in the mid-8th century BC. In 616, the Romans’ sophisticated Etruscan neighbours seized power, but were ousted in 509, the inception of the Roman Republic. It conquered most of the rest of Italy, then turned its attentions overseas, and by the 1st century BC, ruled Spain, North Africa, and Greece.\"],\"url\":\"https://www.rome.info/ancient/history/\"},{\"title\":\"Ancient Rome: At a Glance | Britannica\",\"snippets\":[\"Ancient Rome is the state that originated in the city of Rome during the 8th century bce. Considered one of the most successful imperial powers in history, Rome at its peak encompassed most of Europe and stretched into Africa and Asia. Ancient Rome’s history can be broken down into three eras: the regal period (753−509 bce)\"],\"url\":\"https://www.britannica.com/topic/Ancient-Rome-At-a-Glance-2237745\"},{\"title\":\"Ancient Rome - Facts, Location, & Timeline | HISTORY\",\"snippets\":[\"Learn about the rise and fall of Rome, from its legendary origins to its golden age and decline. Explore the origins of Rome, its military expansion, its political struggles, its cultural achievements and its legacy. Discover how Rome became an empire, a republic and a world power.\"],\"url\":\"https://www.history.com/topics/ancient-rome/ancient-rome\"}]} \n Searching the web for: `history of Rome`",
"author": "bot",
"source_keys": [
"History of Rome - Wikipedia",
"Rome - Wikipedia",
"History of Ancient Rome: When was Rome Founded",
"Ancient Rome: At a Glance | Britannica",
"Ancient Rome - Facts, Location, & Timeline | HISTORY"
],
"source_values": [
"https://en.wikipedia.org/wiki/History_of_Rome",
"https://en.wikipedia.org/wiki/Rome",
"https://www.rome.info/ancient/history/",
"https://www.britannica.com/topic/Ancient-Rome-At-a-Glance-2237745",
"https://www.history.com/topics/ancient-rome/ancient-rome"
],
"suggestions": [
"What are some famous landmarks in Rome?",
"How did the Roman Empire fall?",
"Tell me more about Lazio's cultural heritage."
],
"image_create_text": "",
"messages_left": 29,
"max_messages": 30
}
Process finished with exit code 0
Plugins id:
Notebook id: c310c353-b9f0-4d76-ab0d-1dd5e979cf68
Instacart id: 46664d33-1591-4ce8-b3fb-ba1022b66c11
Kayak id: d6be744c-2bd9-432f-95b7-76e103946e34
Klarna id: 5f143ea3-8c80-4efd-9515-185e83b7cf8a
Opentable id: 543a7b1b-ebc6-46f4-be76-00c202990a1b
Shop id: 39e3566a-d481-4d99-82b2-6d739b1e716e
Suno id: 22b7f79d-8ea4-437e-b5fd-3e21f09f7bc1
Install re-edge-gpt with Pyside GUI
pip install re-edge-gpt[gui]
Run Pyside GUI
from re_edge_gpt.ui.chat.main_ui import start_chat_ui
start_chat_ui()
Install re-edge-gpt with Flask
pip install re-edge-gpt[api]
Run API and export api doc
import os
from re_edge_gpt.api.main_flask import create_app
if __name__ == '__main__':
# Init Flask with blueprint
app = create_app()
# Create new secret key using urandom 24
app.secret_key = os.urandom(24)
app.run(port=8888, debug=True)
else:
app = create_app()
# Create new secret key using urandom 24
app.secret_key = os.urandom(24)
- Q: Exception: Throttled: Request is throttled.
- A: Bing's chat rate limit.
- B: Perhaps your cookie needs to be refreshed.
- https://github.com/Integration-Automation/ReEdgeGPT/issues/117
- Q: RuntimeError: This event loop is already running
- A: If you are using Jupyter, pls use nest_asyncio.apply()
- Like: https://github.com/Integration-Automation/ReEdgeGPT/issues/30
- Q: json.dumps return non ascii char
- A: json.dumps(response, ensure_ascii=False)
- Like: https://github.com/Integration-Automation/ReEdgeGPT/issues/32
- Q: Exception: UnauthorizedRequest: Cannot retrieve user status.
- A: Renew your cookie file.
- Q: Exception: conversationSignature
- A: Clear all your bing cookie and renew your cookie file.
- Like: https://github.com/Integration-Automation/ReEdgeGPT/issues/17
- And: https://github.com/Integration-Automation/ReEdgeGPT/issues/22
- Q: ValueError: Invalid header value b'_U=***\n'
- A: Renew your image cookie.
- Q: Image blocking or redirect error
- A: Now we can't generate multi image on same time (Cause bing limit)
- See https://github.com/Integration-Automation/ReEdgeGPT/issues/22
- Q: UnauthorizedRequest: Token issued by https://sydney.bing.com/sydney is invalid
- A: Bing block your connect, Try to use proxy or clear cookie.
For Tasks:
Click tags to check more tools for each tasksFor Jobs:
Alternative AI tools for ReEdgeGPT
Similar Open Source Tools
ReEdgeGPT
ReEdgeGPT is a tool designed for reverse engineering the chat feature of the new version of Bing. It provides documentation and guidance on how to collect and use cookies to access the chat feature. The tool allows users to create a chatbot using the collected cookies and interact with the Bing GPT chatbot. It also offers support for different modes like Copilot and Bing, along with plugins for various tasks. The tool covers historical information about Rome, the Lazio region, and provides troubleshooting tips for common issues encountered while using the tool.
PsyDI
PsyDI is a multi-modal and interactive chatbot designed for psychological assessments. It aims to explore users' cognitive styles through interactive analysis of their inputs, ultimately determining their Myers-Briggs Type Indicator (MBTI). The chatbot offers customized feedback and detailed analysis for each user, with upcoming features such as an MBTI gallery. Users can access PsyDI directly online to begin their journey of self-discovery.
BIG-Bench-Mistake
BIG-Bench Mistake is a dataset of chain-of-thought (CoT) outputs annotated with the location of the first logical mistake. It was released as part of a research paper focusing on benchmarking LLMs in terms of their mistake-finding ability. The dataset includes CoT traces for tasks like Word Sorting, Tracking Shuffled Objects, Logical Deduction, Multistep Arithmetic, and Dyck Languages. Human annotators were recruited to identify mistake steps in these tasks, with automated annotation for Dyck Languages. Each JSONL file contains input questions, steps in the chain of thoughts, model's answer, correct answer, and the index of the first logical mistake.
LLM-Geo
LLM-Geo is an AI-powered geographic information system (GIS) that leverages Large Language Models (LLMs) for automatic spatial data collection, analysis, and visualization. By adopting LLM as the reasoning core, it addresses spatial problems with self-generating, self-organizing, self-verifying, self-executing, and self-growing capabilities. The tool aims to make spatial analysis easier, faster, and more accessible by reducing manual operation time and delivering accurate results through case studies. It uses GPT-4 API in a Python environment and advocates for further research and development in autonomous GIS.
DiagrammerGPT
DiagrammerGPT is an official implementation of a two-stage text-to-diagram generation framework that utilizes the layout guidance capabilities of LLMs to create accurate open-domain, open-platform diagrams. The tool first generates a diagram plan based on a prompt, which includes dense entities, fine-grained relationships, and precise layouts. Then, it refines the plan iteratively before generating the final diagram. DiagrammerGPT has been used to create various diagrams such as layers of the earth, Earth's position around the sun, and different types of rocks with labels.
aitlas
The AiTLAS toolbox (Artificial Intelligence Toolbox for Earth Observation) includes state-of-the-art machine learning methods for exploratory and predictive analysis of satellite imagery as well as a repository of AI-ready Earth Observation (EO) datasets. It can be easily applied for a variety of Earth Observation tasks, such as land use and cover classification, crop type prediction, localization of specific objects (semantic segmentation), etc. The main goal of AiTLAS is to facilitate better usability and adoption of novel AI methods (and models) by EO experts, while offering easy access and standardized format of EO datasets to AI experts which allows benchmarking of various existing and novel AI methods tailored for EO data.
long-context-attention
Long-Context-Attention (YunChang) is a unified sequence parallel approach that combines the strengths of DeepSpeed-Ulysses-Attention and Ring-Attention to provide a versatile and high-performance solution for long context LLM model training and inference. It addresses the limitations of both methods by offering no limitation on the number of heads, compatibility with advanced parallel strategies, and enhanced performance benchmarks. The tool is verified in Megatron-LM and offers best practices for 4D parallelism, making it suitable for various attention mechanisms and parallel computing advancements.
aihwkit
The IBM Analog Hardware Acceleration Kit is an open-source Python toolkit for exploring and using the capabilities of in-memory computing devices in the context of artificial intelligence. It consists of two main components: Pytorch integration and Analog devices simulator. The Pytorch integration provides a series of primitives and features that allow using the toolkit within PyTorch, including analog neural network modules, analog training using torch training workflow, and analog inference using torch inference workflow. The Analog devices simulator is a high-performant (CUDA-capable) C++ simulator that allows for simulating a wide range of analog devices and crossbar configurations by using abstract functional models of material characteristics with adjustable parameters. Along with the two main components, the toolkit includes other functionalities such as a library of device presets, a module for executing high-level use cases, a utility to automatically convert a downloaded model to its equivalent Analog model, and integration with the AIHW Composer platform. The toolkit is currently in beta and under active development, and users are advised to be mindful of potential issues and keep an eye for improvements, new features, and bug fixes in upcoming versions.
Graph-CoT
This repository contains the source code and datasets for Graph Chain-of-Thought: Augmenting Large Language Models by Reasoning on Graphs accepted to ACL 2024. It proposes a framework called Graph Chain-of-thought (Graph-CoT) to enable Language Models to traverse graphs step-by-step for reasoning, interaction, and execution. The motivation is to alleviate hallucination issues in Language Models by augmenting them with structured knowledge sources represented as graphs.
LLMs-in-science
The 'LLMs-in-science' repository is a collaborative environment for organizing papers related to large language models (LLMs) and autonomous agents in the field of chemistry. The goal is to discuss trend topics, challenges, and the potential for supporting scientific discovery in the context of artificial intelligence. The repository aims to maintain a systematic structure of the field and welcomes contributions from the community to keep the content up-to-date and relevant.
awesome-transformer-nlp
This repository contains a hand-curated list of great machine (deep) learning resources for Natural Language Processing (NLP) with a focus on Generative Pre-trained Transformer (GPT), Bidirectional Encoder Representations from Transformers (BERT), attention mechanism, Transformer architectures/networks, Chatbot, and transfer learning in NLP.
Open-Prompt-Injection
OpenPromptInjection is an open-source toolkit for attacks and defenses in LLM-integrated applications, enabling easy implementation, evaluation, and extension of attacks, defenses, and LLMs. It supports various attack and defense strategies, including prompt injection, paraphrasing, retokenization, data prompt isolation, instructional prevention, sandwich prevention, perplexity-based detection, LLM-based detection, response-based detection, and know-answer detection. Users can create models, tasks, and apps to evaluate different scenarios. The toolkit currently supports PaLM2 and provides a demo for querying models with prompts. Users can also evaluate ASV for different scenarios by injecting tasks and querying models with attacked data prompts.
context-cite
ContextCite is a tool for attributing statements generated by LLMs back to specific parts of the context. It allows users to analyze and understand the sources of information used by language models in generating responses. By providing attributions, users can gain insights into how the model makes decisions and where the information comes from.
AixLib
AixLib is a Modelica model library for building performance simulations developed at RWTH Aachen University, E.ON Energy Research Center, Institute for Energy Efficient Buildings and Indoor Climate (EBC) in Aachen, Germany. It contains models of HVAC systems as well as high and reduced order building models. The name AixLib is derived from the city's French name Aix-la-Chapelle, following a local tradition. The library is continuously improved and offers citable papers for reference. Contributions to the development can be made via Issues section or Pull Requests, following the workflow described in the Wiki. AixLib is released under a 3-clause BSD-license with acknowledgements to public funded projects and financial support by BMWi (German Federal Ministry for Economic Affairs and Energy).
Gemini
Gemini is an open-source model designed to handle multiple modalities such as text, audio, images, and videos. It utilizes a transformer architecture with special decoders for text and image generation. The model processes input sequences by transforming them into tokens and then decoding them to generate image outputs. Gemini differs from other models by directly feeding image embeddings into the transformer instead of using a visual transformer encoder. The model also includes a component called Codi for conditional generation. Gemini aims to effectively integrate image, audio, and video embeddings to enhance its performance.
For similar tasks
ReEdgeGPT
ReEdgeGPT is a tool designed for reverse engineering the chat feature of the new version of Bing. It provides documentation and guidance on how to collect and use cookies to access the chat feature. The tool allows users to create a chatbot using the collected cookies and interact with the Bing GPT chatbot. It also offers support for different modes like Copilot and Bing, along with plugins for various tasks. The tool covers historical information about Rome, the Lazio region, and provides troubleshooting tips for common issues encountered while using the tool.
promptflow
**Prompt flow** is a suite of development tools designed to streamline the end-to-end development cycle of LLM-based AI applications, from ideation, prototyping, testing, evaluation to production deployment and monitoring. It makes prompt engineering much easier and enables you to build LLM apps with production quality.
unsloth
Unsloth is a tool that allows users to fine-tune large language models (LLMs) 2-5x faster with 80% less memory. It is a free and open-source tool that can be used to fine-tune LLMs such as Gemma, Mistral, Llama 2-5, TinyLlama, and CodeLlama 34b. Unsloth supports 4-bit and 16-bit QLoRA / LoRA fine-tuning via bitsandbytes. It also supports DPO (Direct Preference Optimization), PPO, and Reward Modelling. Unsloth is compatible with Hugging Face's TRL, Trainer, Seq2SeqTrainer, and Pytorch code. It is also compatible with NVIDIA GPUs since 2018+ (minimum CUDA Capability 7.0).
beyondllm
Beyond LLM offers an all-in-one toolkit for experimentation, evaluation, and deployment of Retrieval-Augmented Generation (RAG) systems. It simplifies the process with automated integration, customizable evaluation metrics, and support for various Large Language Models (LLMs) tailored to specific needs. The aim is to reduce LLM hallucination risks and enhance reliability.
aiwechat-vercel
aiwechat-vercel is a tool that integrates AI capabilities into WeChat public accounts using Vercel functions. It requires minimal server setup, low entry barriers, and only needs a domain name that can be bound to Vercel, with almost zero cost. The tool supports various AI models, continuous Q&A sessions, chat functionality, system prompts, and custom commands. It aims to provide a platform for learning and experimentation with AI integration in WeChat public accounts.
hugging-chat-api
Unofficial HuggingChat Python API for creating chatbots, supporting features like image generation, web search, memorizing context, and changing LLMs. Users can log in, chat with the ChatBot, perform web searches, create new conversations, manage conversations, switch models, get conversation info, use assistants, and delete conversations. The API also includes a CLI mode with various commands for interacting with the tool. Users are advised not to use the application for high-stakes decisions or advice and to avoid high-frequency requests to preserve server resources.
microchain
Microchain is a function calling-based LLM agents tool with no bloat. It allows users to define LLM and templates, use various functions like Sum and Product, and create LLM agents for specific tasks. The tool provides a simple and efficient way to interact with OpenAI models and create conversational agents for various applications.
embedchain
Embedchain is an Open Source Framework for personalizing LLM responses. It simplifies the creation and deployment of personalized AI applications by efficiently managing unstructured data, generating relevant embeddings, and storing them in a vector database. With diverse APIs, users can extract contextual information, find precise answers, and engage in interactive chat conversations tailored to their data. The framework follows the design principle of being 'Conventional but Configurable' to cater to both software engineers and machine learning engineers.
For similar jobs
weave
Weave is a toolkit for developing Generative AI applications, built by Weights & Biases. With Weave, you can log and debug language model inputs, outputs, and traces; build rigorous, apples-to-apples evaluations for language model use cases; and organize all the information generated across the LLM workflow, from experimentation to evaluations to production. Weave aims to bring rigor, best-practices, and composability to the inherently experimental process of developing Generative AI software, without introducing cognitive overhead.
LLMStack
LLMStack is a no-code platform for building generative AI agents, workflows, and chatbots. It allows users to connect their own data, internal tools, and GPT-powered models without any coding experience. LLMStack can be deployed to the cloud or on-premise and can be accessed via HTTP API or triggered from Slack or Discord.
VisionCraft
The VisionCraft API is a free API for using over 100 different AI models. From images to sound.
kaito
Kaito is an operator that automates the AI/ML inference model deployment in a Kubernetes cluster. It manages large model files using container images, avoids tuning deployment parameters to fit GPU hardware by providing preset configurations, auto-provisions GPU nodes based on model requirements, and hosts large model images in the public Microsoft Container Registry (MCR) if the license allows. Using Kaito, the workflow of onboarding large AI inference models in Kubernetes is largely simplified.
PyRIT
PyRIT is an open access automation framework designed to empower security professionals and ML engineers to red team foundation models and their applications. It automates AI Red Teaming tasks to allow operators to focus on more complicated and time-consuming tasks and can also identify security harms such as misuse (e.g., malware generation, jailbreaking), and privacy harms (e.g., identity theft). The goal is to allow researchers to have a baseline of how well their model and entire inference pipeline is doing against different harm categories and to be able to compare that baseline to future iterations of their model. This allows them to have empirical data on how well their model is doing today, and detect any degradation of performance based on future improvements.
tabby
Tabby is a self-hosted AI coding assistant, offering an open-source and on-premises alternative to GitHub Copilot. It boasts several key features: * Self-contained, with no need for a DBMS or cloud service. * OpenAPI interface, easy to integrate with existing infrastructure (e.g Cloud IDE). * Supports consumer-grade GPUs.
spear
SPEAR (Simulator for Photorealistic Embodied AI Research) is a powerful tool for training embodied agents. It features 300 unique virtual indoor environments with 2,566 unique rooms and 17,234 unique objects that can be manipulated individually. Each environment is designed by a professional artist and features detailed geometry, photorealistic materials, and a unique floor plan and object layout. SPEAR is implemented as Unreal Engine assets and provides an OpenAI Gym interface for interacting with the environments via Python.
Magick
Magick is a groundbreaking visual AIDE (Artificial Intelligence Development Environment) for no-code data pipelines and multimodal agents. Magick can connect to other services and comes with nodes and templates well-suited for intelligent agents, chatbots, complex reasoning systems and realistic characters.