ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Debug script to test loading conversations"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
PROJECT_ROOT = Path(__file__).resolve().parents[2]
|
||||
if str(PROJECT_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(PROJECT_ROOT))
|
||||
|
||||
from test_loader import TestCaseLoader
|
||||
|
||||
def main():
|
||||
loader = TestCaseLoader()
|
||||
|
||||
# Get all test cases
|
||||
print("Getting all test cases...")
|
||||
all_cases = loader.get_all_test_cases()
|
||||
print(f"Found {len(all_cases)} test cases")
|
||||
|
||||
# Get Layer 3 test cases
|
||||
layer3_cases = loader.get_layer3_test_cases()
|
||||
print(f"Found {len(layer3_cases)} Layer 3 test cases")
|
||||
|
||||
if layer3_cases:
|
||||
# Try to load the first one
|
||||
first_case = layer3_cases[0]
|
||||
print(f"\nTrying to load: {first_case['test_id']}")
|
||||
|
||||
conversations = loader.get_test_case_conversations(first_case['test_id'])
|
||||
|
||||
if conversations:
|
||||
print(f"Successfully loaded {len(conversations)} conversations")
|
||||
# Print first conversation snippet
|
||||
if conversations[0]['messages']:
|
||||
print(f"First message: {conversations[0]['messages'][0]['content'][:100]}...")
|
||||
else:
|
||||
print("Failed to load conversations")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user