Skip to content

Commit a3ba907

Browse files
committed
Refactor LLM SDK
1 parent ad14051 commit a3ba907

32 files changed

+2826
-2122
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,4 @@ test/perf/.generated
5757

5858
# Dependencies
5959
node_modules/
60+
*/.idea/

config/gni/devtools_grd_files.gni

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -604,30 +604,36 @@ grd_files_release_sources = [
604604
"front_end/panels/ai_chat/ui/HelpDialog.js",
605605
"front_end/panels/ai_chat/ui/PromptEditDialog.js",
606606
"front_end/panels/ai_chat/ui/SettingsDialog.js",
607+
"front_end/panels/ai_chat/ui/EvaluationDialog.js",
607608
"front_end/panels/ai_chat/core/AgentService.js",
608609
"front_end/panels/ai_chat/core/State.js",
609610
"front_end/panels/ai_chat/core/Graph.js",
610611
"front_end/panels/ai_chat/core/Types.js",
611612
"front_end/panels/ai_chat/core/Constants.js",
612613
"front_end/panels/ai_chat/core/ConfigurableGraph.js",
613614
"front_end/panels/ai_chat/core/GraphConfigs.js",
614-
"front_end/panels/ai_chat/core/OpenAIClient.js",
615-
"front_end/panels/ai_chat/core/LiteLLMClient.js",
616-
"front_end/panels/ai_chat/core/UnifiedLLMClient.js",
617615
"front_end/panels/ai_chat/core/BaseOrchestratorAgent.js",
618616
"front_end/panels/ai_chat/core/PageInfoManager.js",
619617
"front_end/panels/ai_chat/core/AgentNodes.js",
620-
"front_end/panels/ai_chat/core/ChatOpenAI.js",
621-
"front_end/panels/ai_chat/core/ChatLiteLLM.js",
622618
"front_end/panels/ai_chat/core/GraphHelpers.js",
623619
"front_end/panels/ai_chat/core/StateGraph.js",
620+
"front_end/panels/ai_chat/core/Logger.js",
621+
"front_end/panels/ai_chat/LLM/LLMTypes.js",
622+
"front_end/panels/ai_chat/LLM/LLMProvider.js",
623+
"front_end/panels/ai_chat/LLM/LLMProviderRegistry.js",
624+
"front_end/panels/ai_chat/LLM/LLMErrorHandler.js",
625+
"front_end/panels/ai_chat/LLM/LLMResponseParser.js",
626+
"front_end/panels/ai_chat/LLM/OpenAIProvider.js",
627+
"front_end/panels/ai_chat/LLM/LiteLLMProvider.js",
628+
"front_end/panels/ai_chat/LLM/LLMClient.js",
624629
"front_end/panels/ai_chat/tools/Tools.js",
625630
"front_end/panels/ai_chat/tools/CombinedExtractionTool.js",
626631
"front_end/panels/ai_chat/tools/CritiqueTool.js",
627632
"front_end/panels/ai_chat/tools/FetcherTool.js",
628633
"front_end/panels/ai_chat/tools/FinalizeWithCritiqueTool.js",
629634
"front_end/panels/ai_chat/tools/HTMLToMarkdownTool.js",
630635
"front_end/panels/ai_chat/tools/SchemaBasedExtractorTool.js",
636+
"front_end/panels/ai_chat/tools/StreamlinedSchemaExtractorTool.js",
631637
"front_end/panels/ai_chat/tools/VisitHistoryManager.js",
632638
"front_end/panels/ai_chat/tools/FullPageAccessibilityTreeToMarkdownTool.js",
633639
"front_end/panels/ai_chat/common/utils.js",

front_end/panels/ai_chat/BUILD.gn

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,21 @@ devtools_module("ai_chat") {
2929
"core/AgentService.ts",
3030
"core/Constants.ts",
3131
"core/GraphConfigs.ts",
32-
"core/OpenAIClient.ts",
33-
"core/LiteLLMClient.ts",
34-
"core/UnifiedLLMClient.ts",
3532
"core/ConfigurableGraph.ts",
3633
"core/BaseOrchestratorAgent.ts",
3734
"core/PageInfoManager.ts",
3835
"core/AgentNodes.ts",
39-
"core/ChatOpenAI.ts",
40-
"core/ChatLiteLLM.ts",
4136
"core/GraphHelpers.ts",
4237
"core/StateGraph.ts",
4338
"core/Logger.ts",
39+
"LLM/LLMTypes.ts",
40+
"LLM/LLMProvider.ts",
41+
"LLM/LLMProviderRegistry.ts",
42+
"LLM/LLMErrorHandler.ts",
43+
"LLM/LLMResponseParser.ts",
44+
"LLM/OpenAIProvider.ts",
45+
"LLM/LiteLLMProvider.ts",
46+
"LLM/LLMClient.ts",
4447
"tools/Tools.ts",
4548
"tools/CritiqueTool.ts",
4649
"tools/FetcherTool.ts",
@@ -107,24 +110,29 @@ _ai_chat_sources = [
107110
"core/AgentService.ts",
108111
"core/Constants.ts",
109112
"core/GraphConfigs.ts",
110-
"core/OpenAIClient.ts",
111-
"core/LiteLLMClient.ts",
112-
"core/UnifiedLLMClient.ts",
113113
"core/ConfigurableGraph.ts",
114114
"core/BaseOrchestratorAgent.ts",
115115
"core/PageInfoManager.ts",
116116
"core/AgentNodes.ts",
117-
"core/ChatOpenAI.ts",
118-
"core/ChatLiteLLM.ts",
119117
"core/GraphHelpers.ts",
120118
"core/StateGraph.ts",
119+
"core/Logger.ts",
120+
"LLM/LLMTypes.ts",
121+
"LLM/LLMProvider.ts",
122+
"LLM/LLMProviderRegistry.ts",
123+
"LLM/LLMErrorHandler.ts",
124+
"LLM/LLMResponseParser.ts",
125+
"LLM/OpenAIProvider.ts",
126+
"LLM/LiteLLMProvider.ts",
127+
"LLM/LLMClient.ts",
121128
"tools/Tools.ts",
122129
"tools/CritiqueTool.ts",
123130
"tools/FetcherTool.ts",
124131
"tools/FinalizeWithCritiqueTool.ts",
125132
"tools/VisitHistoryManager.ts",
126133
"tools/HTMLToMarkdownTool.ts",
127134
"tools/SchemaBasedExtractorTool.ts",
135+
"tools/StreamlinedSchemaExtractorTool.ts",
128136
"tools/CombinedExtractionTool.ts",
129137
"tools/FullPageAccessibilityTreeToMarkdownTool.ts",
130138
"agent_framework/ConfigurableAgentTool.ts",

0 commit comments

Comments
 (0)