Update index.mjs

for now support for gemini. 
Part "_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?" will most likely be changed later.
This commit is contained in:
Tomasz Panasiuk
2024-02-11 22:07:27 +01:00
committed by josc146
parent 9773a5d196
commit a6fa0ed704
+2 -2
View File
@@ -64,7 +64,7 @@ export default class Bard {
async GetRequestParams() { async GetRequestParams() {
try { try {
const response = await fetch('https://bard.google.com', { const response = await fetch('https://gemini.google.com', {
headers: { headers: {
Cookie: this.cookies, Cookie: this.cookies,
}, },
@@ -99,7 +99,7 @@ export default class Bard {
try { try {
let { at, bl } = await this.GetRequestParams() let { at, bl } = await this.GetRequestParams()
const response = await fetch( const response = await fetch(
'https://bard.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?' + 'https://gemini.google.com/_/BardChatUi/data/assistant.lamda.BardFrontendService/StreamGenerate?' +
new URLSearchParams({ new URLSearchParams({
bl: bl, bl: bl,
rt: 'c', rt: 'c',