QueryOutputs per riflettere il campo is_crypto; aggiunto test per la verifica delle query crypto

This commit is contained in:
2025-10-20 10:16:23 +02:00
parent 0bc8e23303
commit 9513ab0932
4 changed files with 51 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ class QueryInputs(BaseModel):
class QueryOutputs(BaseModel):
response: str
is_ok: bool
is_crypto: bool

View File

@@ -108,7 +108,7 @@ class Pipeline:
# Step 2: Crea gli steps
def condition_query_ok(step_input: StepInput) -> StepOutput:
val = step_input.previous_step_content
return StepOutput(stop=not val.is_ok) if isinstance(val, QueryOutputs) else StepOutput(stop=True)
return StepOutput(stop=not val.is_crypto) if isinstance(val, QueryOutputs) else StepOutput(stop=True)
query_check = Step(name=PipelineEvent.QUERY_CHECK, agent=q_check_agent)
info_recovery = Step(name=PipelineEvent.INFO_RECOVERY, team=team)

View File

@@ -3,6 +3,7 @@ GOAL: check if the query is crypto-related
1) Determine the language of the query:
- This will help you understand better the intention of the user
- Focus on the query of the user
- DO NOT answer the query
2) Determine if the query is crypto or investment-related:
- Crypto-related if it mentions cryptocurrencies, tokens, NFTs, blockchain, exchanges, wallets, DeFi, oracles, smart contracts, on-chain, off-chain, staking, yield, liquidity, tokenomics, coins, ticker symbols, etc.