From ff43f13996cef747188b58a1de55b7fcc31f909c Mon Sep 17 00:00:00 2001 From: Kaiwen He Date: Sat, 1 Jun 2024 10:24:16 -0500 Subject: [PATCH] added agent type and knowledge level to creative edges --- medikanren2/neo/neo-server/neo-server-utils.rkt | 14 ++++++++++++++ medikanren2/neo/neo-server/neo-server.rkt | 7 +++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/medikanren2/neo/neo-server/neo-server-utils.rkt b/medikanren2/neo/neo-server/neo-server-utils.rkt index 4aa6eceb..89bdd578 100644 --- a/medikanren2/neo/neo-server/neo-server-utils.rkt +++ b/medikanren2/neo/neo-server/neo-server-utils.rkt @@ -24,6 +24,8 @@ range-exclude* get-object get-and-print-qualifiers + agent-type-attribute + knowledge-level-attribute ) (require racket/list @@ -224,6 +226,18 @@ A decreases B increases C = A decreases C 'attribute_type_id "biolink:support_graphs" 'value (list id)))) +(define agent-type-attribute + (hash + 'attribute_type_id "biolink:agent_type" + 'value "computational_model" + 'attribute_source "infores:unsecret-agent")) + +(define knowledge-level-attribute + (hash + 'attribute_type_id "biolink:knowledge_level" + 'value "prediction" + 'attribute_source "infores:unsecret-agent")) + ;; TODO: test it with calling out Genetics KP (define (merge-trapi-responses r1 r2 original-query_graph) (let* ((message1 (hash-ref r1 'message)) diff --git a/medikanren2/neo/neo-server/neo-server.rkt b/medikanren2/neo/neo-server/neo-server.rkt index 3a6a182a..610dd997 100644 --- a/medikanren2/neo/neo-server/neo-server.rkt +++ b/medikanren2/neo/neo-server/neo-server.rkt @@ -29,7 +29,7 @@ (define DEFAULT_PORT 8384) -(define NEO_SERVER_VERSION "1.44") +(define NEO_SERVER_VERSION "1.45") ;; Maximum number of results to be returned from *each individual* KP, ;; or from mediKanren itself. @@ -1457,7 +1457,10 @@ (hash-set! edges (string->symbol id) (hash 'attributes (list - (auxiliary-graph-attribute aux-id)) + (auxiliary-graph-attribute aux-id) + agent-type-attribute + knowledge-level-attribute + ) 'object obj 'predicate pred 'subject sub