Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 1bbbd3d

Browse files
committed
test
1 parent 26b683e commit 1bbbd3d

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

tests/system/large/bigquery/test_ai.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,20 @@ def test_generate_text_with_options(text_model):
9494

9595
# It basically asserts that the results are still returned.
9696
assert len(result) == 2
97+
98+
99+
def test_generate_table(text_model):
100+
df = bpd.DataFrame(
101+
{"prompt": ["Generate a table of 2 programming languages and their creators."]}
102+
)
103+
104+
result = ai.generate_table(
105+
text_model,
106+
df,
107+
output_schema="language STRING, creator STRING",
108+
)
109+
110+
assert "language" in result.columns
111+
assert "creator" in result.columns
112+
# The model may not always return the exact number of rows requested.
113+
assert len(result) > 0

0 commit comments

Comments
 (0)