chore: changes context return value in tests
This commit is contained in:
parent
1d63da7923
commit
78fb415892
3 changed files with 9 additions and 9 deletions
|
|
@ -51,7 +51,7 @@ class TestGraphCompletionWithContextExtensionRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionContextExtensionRetriever()
|
retriever = GraphCompletionContextExtensionRetriever()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Canva?")
|
context, _ = await retriever.get_context("Who works at Canva?")
|
||||||
|
|
||||||
assert "Mike Broski --[works_for]--> Canva" in context, "Failed to get Mike Broski"
|
assert "Mike Broski --[works_for]--> Canva" in context, "Failed to get Mike Broski"
|
||||||
assert "Christina Mayer --[works_for]--> Canva" in context, "Failed to get Christina Mayer"
|
assert "Christina Mayer --[works_for]--> Canva" in context, "Failed to get Christina Mayer"
|
||||||
|
|
@ -129,7 +129,7 @@ class TestGraphCompletionWithContextExtensionRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionContextExtensionRetriever(top_k=20)
|
retriever = GraphCompletionContextExtensionRetriever(top_k=20)
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
|
|
||||||
print(context)
|
print(context)
|
||||||
|
|
||||||
|
|
@ -167,7 +167,7 @@ class TestGraphCompletionWithContextExtensionRetriever:
|
||||||
|
|
||||||
await setup()
|
await setup()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
assert context == "", "Context should be empty on an empty graph"
|
assert context == "", "Context should be empty on an empty graph"
|
||||||
|
|
||||||
answer = await retriever.get_completion("Who works at Figma?")
|
answer = await retriever.get_completion("Who works at Figma?")
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ class TestGraphCompletionCoTRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionCotRetriever()
|
retriever = GraphCompletionCotRetriever()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Canva?")
|
context, _ = await retriever.get_context("Who works at Canva?")
|
||||||
|
|
||||||
assert "Mike Broski --[works_for]--> Canva" in context, "Failed to get Mike Broski"
|
assert "Mike Broski --[works_for]--> Canva" in context, "Failed to get Mike Broski"
|
||||||
assert "Christina Mayer --[works_for]--> Canva" in context, "Failed to get Christina Mayer"
|
assert "Christina Mayer --[works_for]--> Canva" in context, "Failed to get Christina Mayer"
|
||||||
|
|
@ -124,7 +124,7 @@ class TestGraphCompletionCoTRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionCotRetriever(top_k=20)
|
retriever = GraphCompletionCotRetriever(top_k=20)
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
|
|
||||||
print(context)
|
print(context)
|
||||||
|
|
||||||
|
|
@ -162,7 +162,7 @@ class TestGraphCompletionCoTRetriever:
|
||||||
|
|
||||||
await setup()
|
await setup()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
assert context == "", "Context should be empty on an empty graph"
|
assert context == "", "Context should be empty on an empty graph"
|
||||||
|
|
||||||
answer = await retriever.get_completion("Who works at Figma?")
|
answer = await retriever.get_completion("Who works at Figma?")
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class TestGraphCompletionRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionRetriever()
|
retriever = GraphCompletionRetriever()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Canva?")
|
context, _ = await retriever.get_context("Who works at Canva?")
|
||||||
|
|
||||||
# Ensure the top-level sections are present
|
# Ensure the top-level sections are present
|
||||||
assert "Nodes:" in context, "Missing 'Nodes:' section in context"
|
assert "Nodes:" in context, "Missing 'Nodes:' section in context"
|
||||||
|
|
@ -191,7 +191,7 @@ class TestGraphCompletionRetriever:
|
||||||
|
|
||||||
retriever = GraphCompletionRetriever(top_k=20)
|
retriever = GraphCompletionRetriever(top_k=20)
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
|
|
||||||
print(context)
|
print(context)
|
||||||
|
|
||||||
|
|
@ -222,5 +222,5 @@ class TestGraphCompletionRetriever:
|
||||||
|
|
||||||
await setup()
|
await setup()
|
||||||
|
|
||||||
context = await retriever.get_context("Who works at Figma?")
|
context, _ = await retriever.get_context("Who works at Figma?")
|
||||||
assert context == "", "Context should be empty on an empty graph"
|
assert context == "", "Context should be empty on an empty graph"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue