-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #858 from isamu/addConfigTest
Add config test
- Loading branch information
Showing
13 changed files
with
67 additions
and
31 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { AgentFunction, AgentFunctionInfo } from "@/index"; | ||
|
||
export const copyConfigAgent: AgentFunction<{ namedKey?: string }> = async ({ params, config }) => { | ||
const { namedKey } = params; | ||
if (namedKey && config) { | ||
return config[namedKey]; | ||
} | ||
return config; | ||
}; | ||
|
||
// for test and document | ||
const copyConfigAgentInfo: AgentFunctionInfo = { | ||
name: "copyConfigAgent", | ||
agent: copyConfigAgent, | ||
mock: copyConfigAgent, | ||
samples: [], | ||
description: "copy config agent", | ||
category: ["test"], | ||
author: "Receptron team", | ||
repository: "https://github.com/receptron/graphai", | ||
license: "MIT", | ||
}; | ||
|
||
export default copyConfigAgentInfo; |
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,9 +1,10 @@ | ||
import echoAgent from "./echo_agent"; | ||
import copyAgent from "./copy_agent"; | ||
import copyConfigAgent from "./copy_config_agent"; | ||
import streamMockAgent from "./stream_mock_agent"; | ||
|
||
import nestedAgent from "./nested_agent"; | ||
import mapAgent from "./map_agent"; | ||
import pushAgent from "./push_agent"; | ||
|
||
export { echoAgent, copyAgent, streamMockAgent, nestedAgent, mapAgent, pushAgent }; | ||
export { echoAgent, copyAgent, copyConfigAgent, streamMockAgent, nestedAgent, mapAgent, pushAgent }; |
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