Skip to content

Commit

Permalink
Merge branch 'feat'
Browse files Browse the repository at this point in the history
  • Loading branch information
bm777 committed Mar 17, 2024
2 parents 9298d8a + fdfae01 commit 4ca775b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions main/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ async function createMainWindow() {
console.log('logger ->', object)
})
ipcMain.on("search-pplx", async (event, args) => {
event.sender.send('search-result', "");
event.sender.send('search-result', " ");
console.log('search-pplx', args)
const { query, model, token, systemPrompt, temperature, maxTokens } = args
const options = {
Expand Down Expand Up @@ -211,7 +211,7 @@ async function createMainWindow() {
}
})
ipcMain.on("search-groq", async (event, args) => {
event.sender.send('search-result', "");
event.sender.send('search-result', " ");
const { query, model, token, systemPrompt, temperature, maxTokens } = args
console.log('search-groq', query, model, token, systemPrompt, temperature, maxTokens)
const groq = new Groq({apiKey: token});
Expand Down Expand Up @@ -254,7 +254,7 @@ async function createMainWindow() {

})
ipcMain.on("search-openai", async (event, args) => {
event.sender.send('search-result', "");
event.sender.send('search-result', " ");
const { query, model, token, systemPrompt, temperature, maxTokens } = args
console.log('search-openai', query, model, token, systemPrompt, temperature, maxTokens)
const openai = new OpenAI({"apiKey": token});
Expand Down Expand Up @@ -287,7 +287,7 @@ async function createMainWindow() {

})
ipcMain.on("search-anthropic", async (event, args) => {
event.sender.send('search-result', "");
event.sender.send('search-result', " ");
const { query, model, token, systemPrompt, temperature, maxTokens } = args
console.log(args)
const anthropic = new Anthopic({ apiKey: token });
Expand Down Expand Up @@ -317,7 +317,7 @@ async function createMainWindow() {
}
})
ipcMain.on("search-cohere", async (event, args) => {
event.sender.send('search-result', "");
event.sender.send('search-result', " ");
const { query, model, token, systemPrompt, temperature, maxTokens } = args
console.log(args)
const cohere = new CohereClient({token: token});
Expand Down
5 changes: 0 additions & 5 deletions renderer/components/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ export default function Search() {
e.preventDefault()
setSearching(true);
if (provider === "perplexity") {
setAnswer(" ");
window.ipc.send(
"search-pplx",
{
Expand All @@ -259,7 +258,6 @@ export default function Search() {
maxTokens: parseInt(maxTokens)
});
} else if (provider === "groq") {
setAnswer(" ");
window.ipc.send(
"search-groq",
{
Expand Down Expand Up @@ -304,7 +302,6 @@ export default function Search() {
setSearching(false);
}
} else if (provider === "openai") {
setAnswer(" ");
window.ipc.send(
"search-openai",
{
Expand All @@ -316,7 +313,6 @@ export default function Search() {
maxTokens: parseInt(maxTokens)
});
} else if (provider === "anthropic") {
setAnswer(" ");
window.ipc.send(
"search-anthropic",
{
Expand All @@ -328,7 +324,6 @@ export default function Search() {
maxTokens: parseInt(maxTokens)
});
} else if (provider === "cohere") {
setAnswer(" ");
window.ipc.send(
"search-cohere",
{
Expand Down

0 comments on commit 4ca775b

Please sign in to comment.