File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ # name: test/sql/rusty_quack.test
2
+ # description: test rusty_quack extension
3
+ # group: [quack]
4
+
5
+ # Before we load the extension, this will fail
6
+ statement error
7
+ SELECT open_prompt('error');
8
+ ----
9
+ Catalog Error: Scalar Function with name open_prompt does not exist!
10
+
11
+ # Require statement will ensure the extension is loaded from now on
12
+ require open_prompt
13
+
14
+ # Confirm the extension works by setting a secret
15
+ query I
16
+ CREATE SECRET IF NOT EXISTS open_prompt (
17
+ TYPE open_prompt,
18
+ PROVIDER config,
19
+ api_token 'xxxxx',
20
+ api_url 'https://api.groq.com/openai/v1/chat/completions',
21
+ model_name 'llama-3.3-70b-versatile',
22
+ api_timeout '30'
23
+ );
24
+ ----
25
+ true
26
+
27
+ # Confirm the secret exists
28
+ query I
29
+ SELECT name FROM duckdb_secrets() WHERE name = 'open_prompt' ;
30
+ ----
31
+ open_prompt
You can’t perform that action at this time.
0 commit comments