-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Web Search capabilities #20
Conversation
also todo: change visibility of messages such that we have an optimal user experience: user enters query, the search web part is done in the backend, then the correct response is directly returned within the same message. currently we have 2 messages in between as shown: message 1. message 2. message 3. But what we can do is after requesting the web search, directly modify the messages history such that the web search results are appended at the end of the user message. Then, we erase the part where gpt requests web search, because that's not useful. message 1. new chat history look like this |
edit: no, the system prompt still has to be invisible |
Qodana for JS5 new problems were found
💡 Qodana analysis was run in the pull request mode: only the changed files were checked Detected 65 dependenciesThird-party software listThis page lists the third-party software dependencies used in project
Contact Qodana teamContact us at [email protected]
|
1. Fix for duplicate user messages A redundant query parameter was passed. Logging in the console produces Old version: { role: 'user', content: 'hi' } { role: 'user', content: 'hi' } New version: { role: 'user', content: 'hi' } 2. Fix retrying generation for deepInfra and replicate Incorrect parameter was passed, following a parameter change from `model` to `options`. 3. Fix regenerate last message. Similar to bug 1, incorrect logic was used regarding passing `query` parameter.
lgtm in dev build |
casual testing so far has been fine. for future reference we also have another alternative: run a search for literally anything. while easily implementable,
|
Adds basic Web Search capability that can be enabled in Preferences. Currently only available in AI Chat, will consider implementing into other AI commands later. Currently more testing of this feature needs to be done.
Summary: When the user sends a message, the AI decides for itself whether to run a web search. The system prompt is used to instruct the AI that it should request a web search only when it is strongly relevant to the user query.
Searches are done using the Tavily API; an API Key needs to be provided in Preferences, and for the free plan there is a limit of 1000 requests/month.
Also included: many many refactors.
closes #19