File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 11<img src =" https://github.com/user-attachments/assets/46a5c546-7e9b-42c7-87f4-bc8defe674e0 " width =250 />
22
33# 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
55
66> Experimental: USE AT YOUR OWN RISK!
77
@@ -12,14 +12,17 @@ This very experimental extension to query OpenAI compatible API endpoints such a
1212- ` set_model_name(model_name) `
1313
1414### Settings
15+ Setup the completions API configuration w/ optional auth token and model name
1516``` 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+
1821```
1922
2023### Usage
2124``` 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;
2326┌────────────────────────────────────────────────┐
2427│ response │
2528│ varchar │
You can’t perform that action at this time.
0 commit comments