This repository has been archived by the owner on Oct 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to new tool factory interface
- Loading branch information
1 parent
219bd26
commit 310bfd6
Showing
8 changed files
with
20 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
...n/kotlin/io/github/llmagentbuilder/tool/javacodeexecution/JavaCodeExecutionToolFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
package io.github.llmagentbuilder.tool.javacodeexecution | ||
|
||
import io.github.llmagentbuilder.core.tool.EnvironmentVariableConfigurableAgentToolFactory | ||
import io.github.llmagentbuilder.core.tool.ConfigurableAgentToolFactory | ||
|
||
class JavaCodeExecutionToolFactory : | ||
EnvironmentVariableConfigurableAgentToolFactory<JavaCodeExecutionTool, JavaCodeExecutionConfig>( | ||
JavaCodeExecutionConfig::class.java, "${toolId}_" | ||
) { | ||
override fun create(config: JavaCodeExecutionConfig): JavaCodeExecutionTool { | ||
ConfigurableAgentToolFactory<JavaCodeExecutionConfig, JavaCodeExecutionTool> { | ||
override fun create(config: JavaCodeExecutionConfig?): JavaCodeExecutionTool { | ||
return JavaCodeExecutionTool(config) | ||
} | ||
|
||
override fun configName(): String { | ||
override fun toolId(): String { | ||
return toolId | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
...tlin/io/github/llmagentbuilder/tool/pythoncodeexecution/PythonCodeExecutionToolFactory.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
package io.github.llmagentbuilder.tool.pythoncodeexecution | ||
|
||
import io.github.llmagentbuilder.core.tool.EnvironmentVariableConfigurableAgentToolFactory | ||
import io.github.llmagentbuilder.core.tool.ConfigurableAgentToolFactory | ||
|
||
class PythonCodeExecutionToolFactory : | ||
EnvironmentVariableConfigurableAgentToolFactory<PythonCodeExecutionTool, PythonCodeExecutionConfig>( | ||
PythonCodeExecutionConfig::class.java, "${toolId}_" | ||
) { | ||
override fun create(config: PythonCodeExecutionConfig): PythonCodeExecutionTool { | ||
ConfigurableAgentToolFactory<PythonCodeExecutionConfig, PythonCodeExecutionTool> { | ||
override fun create(config: PythonCodeExecutionConfig?): PythonCodeExecutionTool { | ||
return PythonCodeExecutionTool(config) | ||
} | ||
|
||
override fun configName(): String { | ||
override fun toolId(): String { | ||
return toolId | ||
} | ||
} |