mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-23 04:01:02 +02:00
Separate template module
This commit is contained in:
parent
8596b73039
commit
2adcc86661
4 changed files with 7 additions and 3 deletions
|
|
@ -13,7 +13,7 @@ from .... base import AgentClientSpec
|
||||||
default_ident = "kg-extract-relationships"
|
default_ident = "kg-extract-relationships"
|
||||||
default_concurrency = 1
|
default_concurrency = 1
|
||||||
default_template_id = "agent-kg-extract"
|
default_template_id = "agent-kg-extract"
|
||||||
default_config_key = "prompt"
|
default_config_type = "prompt"
|
||||||
|
|
||||||
class Processor(FlowProcessor):
|
class Processor(FlowProcessor):
|
||||||
|
|
||||||
|
|
@ -22,12 +22,12 @@ class Processor(FlowProcessor):
|
||||||
id = params.get("id")
|
id = params.get("id")
|
||||||
concurrency = params.get("concurrency", 1)
|
concurrency = params.get("concurrency", 1)
|
||||||
template_id = params.get("template-id", default_template_id)
|
template_id = params.get("template-id", default_template_id)
|
||||||
config_key = params.get("config-key", default_config_key)
|
config_key = params.get("config-type", default_config_type)
|
||||||
|
|
||||||
super().__init__(**params | {
|
super().__init__(**params | {
|
||||||
"id": id,
|
"id": id,
|
||||||
"template-id": template_id,
|
"template-id": template_id,
|
||||||
"config-key": config_key,
|
"config-type": config_key,
|
||||||
"concurrency": concurrency,
|
"concurrency": concurrency,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ class Processor(FlowProcessor):
|
||||||
super(Processor, self).__init__(
|
super(Processor, self).__init__(
|
||||||
**params | {
|
**params | {
|
||||||
"id": id,
|
"id": id,
|
||||||
|
"config-type": config_key,
|
||||||
"concurrency": concurrency,
|
"concurrency": concurrency,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
3
trustgraph-flow/trustgraph/templates/__init__.py
Normal file
3
trustgraph-flow/trustgraph/templates/__init__.py
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
from .prompt_manager import *
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue