Commit b734f82 1 parent d4eec76 commit b734f82 Copy full SHA for b734f82
File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
<img src =" https://github.com/user-attachments/assets/46a5c546-7e9b-42c7-87f4-bc8defe674e0 " width =250 />
2
2
3
3
# DuckDB Open Prompt Extension
4
- This very experimental extension to query OpenAI compatible API endpoints such as Ollama
4
+ Simple extension to query OpenAI Completion API endpoints such as Ollama
5
5
6
6
> Experimental: USE AT YOUR OWN RISK!
7
7
@@ -12,14 +12,17 @@ This very experimental extension to query OpenAI compatible API endpoints such a
12
12
- ` set_model_name(model_name) `
13
13
14
14
### Settings
15
+ Setup the completions API configuration w/ optional auth token and model name
15
16
``` sql
16
- SELECT set_api_token(' your_api_key_here' );
17
- SELECT set_api_url(' http://localhost:11434/v1/chat/completions' );
17
+ SET VARIABLE openprompt_api_url = ' http://localhost:11434/v1/chat/completions' ;
18
+ SET VARIABLE openprompt_api_token = ' your_api_key_here' ;
19
+ SET VARIABLE openprompt_model_name = ' qwen2.5:0.5b' ;
20
+
18
21
```
19
22
20
23
### Usage
21
24
``` sql
22
- D SELECT open_prompt(' Write a one-line poem about ducks' , ' qwen2.5:0.5b ' ) AS response;
25
+ D SELECT open_prompt(' Write a one-line poem about ducks' ) AS response;
23
26
┌────────────────────────────────────────────────┐
24
27
│ response │
25
28
│ varchar │
You can’t perform that action at this time.
0 commit comments