interstellard / chatgpt-advanced Goto Github PK
View Code? Open in Web Editor NEWWebChatGPT: A browser extension that augments your ChatGPT prompts with web results.
Home Page: https://webchatgpt.app
License: MIT License
WebChatGPT: A browser extension that augments your ChatGPT prompts with web results.
Home Page: https://webchatgpt.app
License: MIT License
It would be such a leap in functionality to include the option to construct custom search operators such as site: and "", allowing the user to filter the web search to just websites within domains such as .edu and .org, (or specific URLs) as well as only web results from pages that contain the "DOI:" phrase. For the time being, it does not even work well with custom prompts. It would be useful to be able to include anything like:
site:.edu AND site:.org AND "DOI:"
Optimally, it would be just two more fields in the footer bar: one for multiple site: operators separated by commas, and one for the "must contain" operators <""> separated by commas.
The extension from Wong2 is able to display ChatGPT response alongside Google Search results. Would be nice if it was able to combine with this extension for up to date info.
Hi, I am using the plugin in my mobile browser, can you please also support mobile responsive, please?
or we can add the config in the setting page, letting users to choose which item display on the webiste
I cannot use it,it said:
An error occurred
Check the console for more details.
not work at all。
Could a new switch be added to auto-disable Search on the web ?
This plugin is fantastic for utilizing CHATGPT for getting the latest data and answering questions, but often times after searching for results, I forget to close the Search on the web and continue using CHATGPT for other Q&A.
Thank you for your hard work and making CHATGPT even better!
The only problem now is that "Generate share link" button that ShareGPT has doesn't show up when I am using Chatgpt-advanced. I kinda wish the two extensions were compatible with each other.
Icon grey
I am having an issue with chatGPT Plus. When I activate it, a model selection box appears at the top of the screen, which causes a layout problem. The selection box blocks the view of the pagination buttons located under the prompt. This makes it difficult for me to use the feature. Could you please fix this issue so that the prompt and pagination buttons are visible at the same time? Thank you.
Please
We all deserve this, and we all need this. Sometimes the web search results are not helpful or destroy the question. You must turn off this extension every time you don't want to search the web.
Great tool! thank you.
Add an option to search for results on google scholar instead of google.
Thank you!
Originally posted by guidevops February 8, 2023
Dear WebChatGPT Team,
I am a user of the WebChatGPT browser extension and I love the Prompt Editor feature. However, I would like to create custom prompts without the requirement of an internet search.
I would greatly appreciate it if this feature could be added to the extension. It would allow me to create more versatile and customized prompts to better fit my needs.
Thank you for your hard work and dedication in creating such a great tool. I look forward to hearing back from you.
let isWebAccessOn = true;
let isProcessing = false;
var numWebResults = 1;
chrome.storage.sync.get(["num_web_results", "web_access"], (data) => {
numWebResults = data.num_web_results;
isWebAccessOn = data.web_access;
});
window.addEventListener("load", function () {
const threadLayout = document.querySelector("[class^='ThreadLayout__NodeWrapper']");
try {
setTitle();
addCapabilitiesDescription();
} catch (e) { console.log(e); }
threadLayout.addEventListener("DOMNodeInserted", (event) => {
try {
if (event.target.classList[0].startsWith("shared__Wrapper")) {
setTitle();
addCapabilitiesDescription();
}
if (event.target.classList[0].startsWith("ConversationItem__ActionButtons")) {
addCopyButton(event.target);
}
} catch (e) { console.log(e); }
});
});
function setTitle() {
const title = document.querySelector("[class^='shared__Title']");
if (title) {
title.textContent = "ChatGPT Advanced";
}
}
function addCapabilitiesDescription() {
addListItem("Advanced: Copy generated messages to clipboard");
addListItem("Advanced: Augment your prompts with web search results");
function addListItem(text) {
const capability = document.querySelectorAll("[class^='shared__Capability']")[1];
const listItem = capability.querySelector("[class^='shared__ListItem']");
const li = document.createElement("li");
li.className = listItem.className;
li.style.borderWidth = "1px";
li.textContent = text;
// add it to the list as the first item:
listItem.parentNode.insertBefore(li, listItem.parentNode.firstChild);
}
}
function addCopyButton(actionButtons) {
actionButtons.style.flexDirection = "column";
actionButtons.style.alignItems = "center";
const copyButton = document.createElement("button");
const svgCopy = '<svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2"></path><rect x="8" y="2" width="8" height="4" rx="1" ry="1"></rect></svg>';
const svgDone = '<svg stroke="currentColor" fill="none" stroke-width="2" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round" class="w-4 h-4" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><polyline points="20 6 9 17 4 12"></polyline></svg>'
copyButton.innerHTML = svgCopy;
copyButton.classList.add("copy-button");
copyButton.addEventListener("click", () => {
const message = actionButtons.parentElement.textContent;
navigator.clipboard.writeText(message);
copyButton.innerHTML = svgDone;
setTimeout(() => {
copyButton.innerHTML = svgCopy;
}, 2500);
});
actionButtons.appendChild(copyButton);
}
var textareaWrapper = document.querySelector("[class^='PromptTextarea__TextareaWrapper']");
var textarea = document.querySelector("textarea");
textarea.addEventListener("keydown", function (event) {
if (event.key === 'Enter' && isWebAccessOn && !isProcessing) {
isProcessing = true;
// showCommandsList(false);
let query = textarea.value;
textarea.value = "";
fetch(`https://ddg-webapp-aagd.vercel.app/search?max_results=${numWebResults}&q=${query}`)
.then(response => response.json())
.then(results => {
let formattedResults = results.map(result => `"${result.body}"\nSource: ${result.href}`).join("\n\n");
formattedResults = formattedResults + `\n\nGiven these web results, answer the following question: ${query}`;
textarea.value = formattedResults;
// simulate pressing enter on the textarea
textarea.focus();
const enterEvent = new KeyboardEvent('keydown', { bubbles: true, cancelable: true, key: 'Enter', code: 'Enter' });
textarea.dispatchEvent(enterEvent);
isProcessing = false;
});
}
});
var toolbarDiv = document.createElement("div");
toolbarDiv.classList.add("chatgpt-adv-toolbar", "gap-3");
toolbarDiv.style.padding = "0em 0.5em 0em 0.5em";
// Web access switch
var toggleWebAccessDiv = document.createElement("div");
toggleWebAccessDiv.innerHTML = '
var checkbox = toggleWebAccessDiv.querySelector(".chatgpt-adv-toggle-checkbox");
checkbox.addEventListener("click", function () {
isWebAccessOn = checkbox.checked;
chrome.storage.sync.set({ "web_access": checkbox.checked });
});
// reset thread button
var resetButton = document.createElement("button");
resetButton.className = "chatgpt-adv-reset-button btn flex gap-2 justify-center btn-neutral";
resetButton.style.padding = "0.5em";
resetButton.innerHTML = 'Reset Thread';
toolbarDiv.appendChild(resetButton);
resetButton.addEventListener("click", () => {
const anchors = document.querySelectorAll('a');
let resetThreadAnchor = Array.from(anchors).find(anchor => anchor.innerText === 'Reset Thread');
const mouseEvent = new MouseEvent('click', { view: window, bubbles: true, cancelable: true });
resetThreadAnchor.dispatchEvent(mouseEvent);
textarea.focus();
});
textareaWrapper.parentNode.insertBefore(toolbarDiv, textareaWrapper);
var divider = document.createElement("hr");
var optionsDiv = document.createElement("div");
optionsDiv.classList.add("p-4", "space-y-2");
var title = document.createElement("h4");
title.innerHTML = "Advanced Options";
title.classList.add("pb-4", "text-lg", "font-bold");
var labelDiv = document.createElement("div");
labelDiv.classList.add("flex", "justify-between");
var label = document.createElement("label");
label.innerHTML = "Web results";
var value = document.createElement("span");
chrome.storage.sync.get("num_web_results", (data) => {
value.innerHTML = data.num_web_results;
});
label.appendChild(value);
labelDiv.appendChild(label);
labelDiv.appendChild(value);
var numWebResultsSlider = document.createElement("input");
numWebResultsSlider.type = "range";
numWebResultsSlider.min = 1;
numWebResultsSlider.max = 10;
numWebResultsSlider.step = 1;
chrome.storage.sync.get("num_web_results", (data) => {
numWebResultsSlider.value = data.num_web_results;
});
numWebResultsSlider.classList.add("w-full");
numWebResultsSlider.oninput = function () {
numWebResults = this.value;
value.innerHTML = numWebResults;
chrome.storage.sync.set({ "num_web_results": this.value });
};
optionsDiv.appendChild(title);
optionsDiv.appendChild(labelDiv);
optionsDiv.appendChild(numWebResultsSlider);
var navMenuItem = document.querySelector('[class^="Navigation__NavMenuItem"]');
var navMenu = navMenuItem.parentNode;
navMenu.appendChild(divider);
navMenu.appendChild(optionsDiv);
Does it read the entire content of the web pages or only the first lines (those displayed in the prompt ending with "...") for each page?
I unzipped the compressed package according to the tutorial and used the Edge browser, but still prompted that my region does not support it
Could you kindly make an edge version? Thx a lot
I have tried to make a chrome extention to publish chatGPT chat to GitHub for other people to read and take that as reference but as I dont have much experience developing a chrome extention I was not able to implement it correctly.
Can you ingest the code into this repo so that there is a button that says publish to github
and by pressing that button we can publish our current chat to our pre-defined github repo.
Here you can take these two repos of mine and can totally take all the code from it to use in this repo's development and you can add my name in the contributors in this repo.
https://github.com/hemangjoshi37a/ChatGPTPublish
https://github.com/hemangjoshi37a/my_chat_with_chatGPT
I have all the code needed to automate the process to converting html to json and then publishing to github repo using python. That is mentioned in these two repos.
Thanks.
Hi,
I'm having an issue with the page layout while using this extension. It appears that the added div
with information about the extension is breaking the bottom part of the page layout, which is then covering some parts of ChatGPT responses and the appearance of the extension itself (Search on the web
button).
After some troubleshooting with the developer tools, I found that deleting the info box fixes the problem, and it seems to work as intended.
Browser: Brave Nightly, Edge (ver. 110.0.1587.46)
ChatGPT variant: PLUS
Display: 1080p and 2560x1440
Dev tools logs are empty.
What Checkpoint do you use?
I have read, that a checkpoint does cost anything. So do you pay this b yourself?
Would be interested in an answer. Thank you.
Hi,
Loving the work you have done. However occasionally when I open C'GPT I get the row with the options at the bottom of the screen repeating three times.
Just like this:
This has only just started to happen in the last 3 or 4 days. I think it may be down to the font I use across all my webpages. Which is: opendyslexic, mono variant.
But I'm no expert, so I'm probably wrong.
First time posting on GH so I hope the images work.
Thanks again for your hard work.
Mike
I have tried for many times, without success. Could you help to investiage?
I'm a graduate student in college and wanted to know if a similar advanced toolbar could be created that could connect and search only the university library.
Maybe hard limit it to 50 to avoid overwhelming the platform.
Hi, congratulations for the wonderful idea you had in making this browser extension, is the best thing I installed since ChatGPT has been released.
I would like to customize Web ChatGPT instruction set given to ChatGPT, for three reasons:
I am Italian, and I would like ChatGPT to answer in Italian, and I can achieve this only if I translate the instructions in my language (or I can leave them in English and add "Answer in Italian" line).
More important, sometimes I would like to make ChatGPT just shortly sum up what the Google results say. For example, let's say that I search 10 results for "Ukraine war news", and I don't want ChatGPT to say "result 1 says this, result 2 says this other, etc." but I just want to know a summary of all of the news in a few sentences: if I just could customize your extension, I could achieve this result.
Also, every user could share his experiences and customizations.
Thanks for reading
Hi qunash,
Is it possible that you can also open source the part of code for searching (https://ddg-webapp-aagd.vercel.app
)? Wondering if we can make each result longer.
: )
Hi
Thanks for this extensions, it is great!
It is possible to add one option to remove citations numbers?
It would be nice to be able to use identifiable search entities.
ddg-webapp-aagd.vercel.app
is being identified as malware.
an firefox extension would be quite nice
Hi, great job with the extension. I would like to inquire if you use any free API to get the search results.
Thanks for this nice Plugin.
Could you please provide the Server-Script / Implementation you made at your vercel-server, so that user can setup their own script for it.
I am not saying that you are up to no good, but you know the maxim for the internet: trust nobody when it comes to your sensitive data.
I think many users would appreciate to be able to run that script at their own servers / pc's.
I ask in polish, search in poland, but answer is in english
I love the extension! Here's the issue, I just recently signed up for ChatGPT Plus. It adds a model dropdown list, which causes the flexbox to be applied to your div to make them inline instead of stacked. Please take a look at the screenshot. I read another similar issue here but have yet to install any other ChatGPT extensions. So that's unlikely related. I'm very grateful for your work so far!
title
Hey,
Really great extension!
While using, I thought of some features that would probably be helpful to a lot of people. Maybe under an "advanced settings"
section.
Thanks for doing such amazing work
Have a nice day :)
I have tried it, and I need to modify the manifest.json, but this is not compatible with the version here.
Do I need to fork a version to help you upload it to Firefox AMO? Or what should I do?
Hi there!
First of all let me say that this is one of the coolest extensions out there!
How I wish it would also scape the data from those sites, not just the headers and such, but until then...
OpenAI just released their history management, that with some other extensions, the side panel is fully packed
currently the Advanced Option take almost half of my sidebar,
If you can please, make the Advanced Options be collapsable, smaller and more minimalistic, or at least, be hidden when i toggle off "search the web". (atleast that last one) should be simple right?
Thanks a lot! and have a good one !
Can https://elicit.org/ be used as search engine for ChatGPT. It is an AI research paper search tool, and integrating both can help many of us.
I keep having to copy and paste from other websites to have the AI pretend to be something, and feel like it would be useful right at the current screen, under the slider. I was trying to code it but I am not experienced in javascript.
Following from issue #36, I have just discovered that no API is required.
Just use a prompt like this:
This webpage shows a list of web search results. For each result, you can find the URL of the result just before it. Using that URL, create an overview of the topic in the search bar. The overview should be made with a list of items, with each item referring to a specific result. Cite the result in the form [number] and summarize in at least two sentences how ad why the item contributes to the advancement of the knowledge or of techniques in the topic. The top 10 results should be included in the list.
Web search result: https://www.startpage.com/do/search?lui=english&language=english&query=today+news&cat=news&sc=tidmtJCmjbvf20&t=device&segment=startpage.udog&with_date=d
Topic: Today News
It retrieves the top 10 news of today from startpage without any API.
I think that this extension can just do this trick as a general-purpose method (put the link of the whole page with the results in the prompt, without using any API). In addition, finer control for ddg or semantic scholar could be provided via API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.