Spaces:
Running
Running
Jeremiah Lowin commited on
Commit ·
3b5b8a2
1
Parent(s): f581042
Fix typing issue
Browse files
tests/prompts/test_base.py
CHANGED
|
@@ -57,7 +57,7 @@ class TestRenderPrompt:
|
|
| 57 |
|
| 58 |
@pytest.mark.anyio
|
| 59 |
async def test_fn_returns_message(self):
|
| 60 |
-
async def fn() ->
|
| 61 |
return UserMessage(content="Hello, world!")
|
| 62 |
|
| 63 |
prompt = Prompt.from_function(fn)
|
|
@@ -67,7 +67,7 @@ class TestRenderPrompt:
|
|
| 67 |
|
| 68 |
@pytest.mark.anyio
|
| 69 |
async def test_fn_returns_assistant_message(self):
|
| 70 |
-
async def fn() ->
|
| 71 |
return AssistantMessage(
|
| 72 |
content=TextContent(type="text", text="Hello, world!")
|
| 73 |
)
|
|
@@ -108,7 +108,7 @@ class TestRenderPrompt:
|
|
| 108 |
async def test_fn_returns_resource_content(self):
|
| 109 |
"""Test returning a message with resource content."""
|
| 110 |
|
| 111 |
-
async def fn() ->
|
| 112 |
return UserMessage(
|
| 113 |
content=EmbeddedResource(
|
| 114 |
type="resource",
|
|
|
|
| 57 |
|
| 58 |
@pytest.mark.anyio
|
| 59 |
async def test_fn_returns_message(self):
|
| 60 |
+
async def fn() -> Message:
|
| 61 |
return UserMessage(content="Hello, world!")
|
| 62 |
|
| 63 |
prompt = Prompt.from_function(fn)
|
|
|
|
| 67 |
|
| 68 |
@pytest.mark.anyio
|
| 69 |
async def test_fn_returns_assistant_message(self):
|
| 70 |
+
async def fn() -> Message:
|
| 71 |
return AssistantMessage(
|
| 72 |
content=TextContent(type="text", text="Hello, world!")
|
| 73 |
)
|
|
|
|
| 108 |
async def test_fn_returns_resource_content(self):
|
| 109 |
"""Test returning a message with resource content."""
|
| 110 |
|
| 111 |
+
async def fn() -> Message:
|
| 112 |
return UserMessage(
|
| 113 |
content=EmbeddedResource(
|
| 114 |
type="resource",
|