|
5 | 5 |
|
6 | 6 | from labelbox import MediaType, OntologyBuilder, Tool
|
7 | 7 | from labelbox.orm.model import Entity
|
8 |
| -from labelbox.schema.tool_building.fact_checking_tool import FactCheckingTool |
9 |
| -from labelbox.schema.tool_building.step_reasoning_tool import StepReasoningTool |
| 8 | +from labelbox.schema.ontology_building.fact_checking_tool import ( |
| 9 | + FactCheckingTool, |
| 10 | +) |
| 11 | +from labelbox.schema.ontology_building.step_reasoning_tool import ( |
| 12 | + StepReasoningTool, |
| 13 | +) |
10 | 14 |
|
11 | 15 |
|
12 | 16 | def test_feature_schema_is_not_archived(client, ontology):
|
@@ -425,53 +429,9 @@ def test_fact_checking_ontology(chat_evaluation_ontology):
|
425 | 429 |
|
426 | 430 | def test_prompt_issue_ontology(chat_evaluation_ontology):
|
427 | 431 | ontology = chat_evaluation_ontology
|
428 |
| - fact_checking = None |
429 |
| - import pdb; pdb.set_trace() |
| 432 | + prompt_issue = None |
430 | 433 | for tool in ontology.normalized["tools"]:
|
431 |
| - if tool["tool"] == "fact-checking": |
432 |
| - fact_checking = tool |
| 434 | + if tool["tool"] == "prompt-issue": |
| 435 | + prompt_issue = tool |
433 | 436 | break
|
434 |
| - assert fact_checking is not None |
435 |
| - assert fact_checking["definition"]["variants"] == [ |
436 |
| - {"id": 0, "name": "Accurate"}, |
437 |
| - {"id": 1, "name": "Inaccurate"}, |
438 |
| - {"id": 2, "name": "Disputed"}, |
439 |
| - {"id": 3, "name": "Unsupported", "actions": ["writeJustification"]}, |
440 |
| - { |
441 |
| - "id": 4, |
442 |
| - "name": "Can't confidently assess", |
443 |
| - "actions": ["writeJustification"], |
444 |
| - }, |
445 |
| - { |
446 |
| - "id": 5, |
447 |
| - "name": "No factual information", |
448 |
| - "actions": ["writeJustification"], |
449 |
| - }, |
450 |
| - ] |
451 |
| - assert fact_checking["definition"]["version"] == 1 |
452 |
| - assert fact_checking["schemaNodeId"] is not None |
453 |
| - assert fact_checking["featureSchemaId"] is not None |
454 |
| - |
455 |
| - fact_checking = None |
456 |
| - for tool in ontology.tools(): |
457 |
| - if isinstance(tool, FactCheckingTool): |
458 |
| - fact_checking = tool |
459 |
| - break |
460 |
| - assert fact_checking is not None |
461 |
| - |
462 |
| - assert fact_checking.definition.variants.asdict() == [ |
463 |
| - {"id": 0, "name": "Accurate"}, |
464 |
| - {"id": 1, "name": "Inaccurate"}, |
465 |
| - {"id": 2, "name": "Disputed"}, |
466 |
| - {"id": 3, "name": "Unsupported", "actions": ["writeJustification"]}, |
467 |
| - { |
468 |
| - "id": 4, |
469 |
| - "name": "Can't confidently assess", |
470 |
| - "actions": ["writeJustification"], |
471 |
| - }, |
472 |
| - { |
473 |
| - "id": 5, |
474 |
| - "name": "No factual information", |
475 |
| - "actions": ["writeJustification"], |
476 |
| - }, |
477 |
| - ] |
| 437 | + assert prompt_issue is not None |
0 commit comments