mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-24 12:41:02 +02:00
Simplify the prompt spec invocation
This commit is contained in:
parent
5244e86615
commit
83536b2942
1 changed files with 3 additions and 5 deletions
|
|
@ -8,10 +8,10 @@ import logging
|
|||
from typing import Dict, Any, Optional, List
|
||||
|
||||
from ...schema import QuestionToStructuredQueryRequest, QuestionToStructuredQueryResponse
|
||||
from ...schema import PromptRequest, PromptResponse
|
||||
from ...schema import PromptRequest
|
||||
from ...schema import Error, RowSchema, Field as SchemaField
|
||||
|
||||
from ...base import FlowProcessor, ConsumerSpec, ProducerSpec, ClientSpec
|
||||
from ...base import FlowProcessor, ConsumerSpec, ProducerSpec, PromptClientSpec
|
||||
|
||||
# Module logger
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
@ -57,11 +57,9 @@ class Processor(FlowProcessor):
|
|||
|
||||
# Client spec for calling prompt service
|
||||
self.register_specification(
|
||||
ClientSpec(
|
||||
PromptClientSpec(
|
||||
request_name = "prompt-request",
|
||||
response_name = "prompt-response",
|
||||
request_schema = PromptRequest,
|
||||
response_schema = PromptResponse
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue