From b734f8274ddb834b81ee7cc287f3c92e98342387 Mon Sep 17 00:00:00 2001 From: Lorenzo Mangani Date: Sat, 26 Oct 2024 11:00:07 +0200 Subject: [PATCH] Update instructions --- docs/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/README.md b/docs/README.md index e5f8863..668abcd 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,7 +1,7 @@ # DuckDB Open Prompt Extension -This very experimental extension to query OpenAI compatible API endpoints such as Ollama +Simple extension to query OpenAI Completion API endpoints such as Ollama > Experimental: USE AT YOUR OWN RISK! @@ -12,14 +12,17 @@ This very experimental extension to query OpenAI compatible API endpoints such a - `set_model_name(model_name)` ### Settings +Setup the completions API configuration w/ optional auth token and model name ```sql -SELECT set_api_token('your_api_key_here'); -SELECT set_api_url('http://localhost:11434/v1/chat/completions'); +SET VARIABLE openprompt_api_url = 'http://localhost:11434/v1/chat/completions'; +SET VARIABLE openprompt_api_token = 'your_api_key_here'; +SET VARIABLE openprompt_model_name = 'qwen2.5:0.5b'; + ``` ### Usage ```sql -D SELECT open_prompt('Write a one-line poem about ducks', 'qwen2.5:0.5b') AS response; +D SELECT open_prompt('Write a one-line poem about ducks') AS response; ┌────────────────────────────────────────────────┐ │ response │ │ varchar │