https://github.com/agiunderground/google-bard-logger
Extract data from a current active Google Bard session and print it to the console log.
https://github.com/agiunderground/google-bard-logger
bard google-bard js logging neural-network
Last synced: 7 months ago
JSON representation
Extract data from a current active Google Bard session and print it to the console log.
- Host: GitHub
- URL: https://github.com/agiunderground/google-bard-logger
- Owner: agiUnderground
- Created: 2023-04-11T11:43:54.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-04-11T11:55:11.000Z (over 2 years ago)
- Last Synced: 2025-01-22T11:48:24.268Z (9 months ago)
- Topics: bard, google-bard, js, logging, neural-network
- Homepage:
- Size: 1000 Bytes
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# google-bard-logger
Extract data from a current active session and print it to the console log.Sometimes a conversation with your neural network buddy can be really productive and you want to save it. Instead of scrolling over hundreds of messages and manually take screenshots, just put the code below in a console of your browser. It will extract a conversation data in a `question N : answer N` format and will print in to the console. Then you'll be able to just select and copy conversation logs.
```
function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
var i = 1;
for (;;) {
try {
console.log("=================================================================================\n");
console.log(`Question ${i}\n`);
console.log(getElementByXpath(`/html/body/chat-app/side-navigation/mat-sidenav-container/mat-sidenav-content/main/chat-window/div[1]/div[1]/div/div[${i}]/user-query/div/div[2]/h2`).innerHTML+"\n");
console.log(`Answer ${i}\n`);
console.log(getElementByXpath(`/html/body/chat-app/side-navigation/mat-sidenav-container/mat-sidenav-content/main/chat-window/div[1]/div[1]/div/div[${i}]/model-response/response-container/div/div[2]/div/message-content/div`).innerText+"\n");
i++;
}catch(e){
break;
}
}
```