Skip to content

Commit

Permalink
chore: demo
Browse files Browse the repository at this point in the history
  • Loading branch information
veasion committed Jan 3, 2025
1 parent 63341b8 commit b137d4c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 475 deletions.
18 changes: 18 additions & 0 deletions src/background/first_workflow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Eko } from "@eko-ai/eko";
import { EkoConfig } from "@eko-ai/eko/types";
import { tools, getLLMConfig } from "@eko-ai/eko/extension";

export async function main() {
// Load LLM model configuration
// the current browser plugin project provides a page for configuring LLM parameters
let config = await getLLMConfig();
if (!config && !config.apiKey) {
throw Error("Please configure apiKey");
}

// Initialize eko
let eko = new Eko(config as EkoConfig);

// TODO workflow code

}
20 changes: 6 additions & 14 deletions src/background/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import { testTools } from "./test_tools";
import { testWebSearchWithLLM } from "./test_llm_search";
import { testWebSearchWithComputer } from "./test_llm_computer";
import { testWebSearchWithWorkflow } from "./test_llm_workflow";
import { main } from "./first_workflow";

chrome.runtime.onMessage.addListener(async function (
request,
sender,
sendResponse
) {
// Listen to messages from the browser extension
chrome.runtime.onMessage.addListener(async function (request, sender, sendResponse) {
if (request.type == "run") {
// await testTools();
// await testWebSearchWithLLM();
// await testWebSearchWithComputer();
await testWebSearchWithWorkflow();
// Click the RUN button to execute the main function (workflow)
await main();
}
});
});
149 changes: 0 additions & 149 deletions src/background/test_llm_computer.ts

This file was deleted.

143 changes: 0 additions & 143 deletions src/background/test_llm_search.ts

This file was deleted.

23 changes: 0 additions & 23 deletions src/background/test_llm_workflow.ts

This file was deleted.

Loading

0 comments on commit b137d4c

Please sign in to comment.