--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: docn excerpt: | DuckDB Community Extensions DigitalOcean AI-Native Cloud services as SQL functions extension: name: docn description: DigitalOcean AI-Native Cloud services as SQL functions version: 0.1.0 language: C/C++ build: CMake license: MIT requires_toolchains: "vcpkg;python3" vcpkg_commit: "84bab45d415d22042bd0b9081aea57f362da3f35" # Requests need libcurl, which is not available in the browser (Wasm) builds. excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_mingw" opt_in_platforms: "osx_amd64;linux_amd64_musl;linux_arm64_musl;windows_arm64" maintainers: - MehulBatra repo: github: digitalocean-labs/duckdb-do ref: 02039868b47efa85a9fd0f14b38aac8f86cc92b3 docs: hello_world: | -- Set your key in the shell before starting DuckDB: -- export DO_MODEL_ACCESS_KEY='...' -- or inside DuckDB: SET do_model_access_key = '...'; LOAD docn; -- List the available models (no key needed) SELECT name, type FROM do_models() LIMIT 5; -- A few rows to work with CREATE TABLE reviews AS FROM (VALUES ('The app crashes every time I upload a photo.'), ('Fast delivery and great support, thank you!'), ('I was charged twice this month.') ) t(review); -- Yes/no question per row: 0.97 means very likely yes SELECT review, (do_decide(review, 'Is the customer happy?') ->> 'noul')::DOUBLE AS happy FROM reviews; -- Pick one label per row: bug, praise, billing SELECT review, do_decide(review, 'What is this about?', 'choice', ['bug', 'billing', 'praise']) ->> 'choice' AS topic FROM reviews; -- Free text answer per row SELECT review, do_prompt('Reply to this review in one sentence: ' || review) AS reply FROM reviews; -- Similarity search with embeddings SELECT review FROM reviews ORDER BY list_cosine_similarity(do_embed(review), do_embed('billing issue')) DESC LIMIT 1; extended_description: | The docn extension brings the DigitalOcean AI-Native Cloud to DuckDB. It exposes DigitalOcean services as SQL functions, starting with Serverless Inference: do_models lists the available models, do_decide answers closed questions (yes/no, choice, score) about text, do_prompt sends prompts to chat models and do_embed turns text into embedding vectors. See https://github.com/digitalocean-labs/duckdb-do for documentation. extension_star_count: 0 extension_star_count_pretty: 0 extension_download_count: null extension_download_count_pretty: n/a image: '/images/community_extensions/social_preview/preview_community_extension_docn.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Linux ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | macOS ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows AMD64 | ❌ | ❌ | ❌ | ❌ | ✅ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ✅ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |---------------|---------------|-------------|---------|----------| | do_decide | scalar | NULL | NULL | | | do_embed | scalar | NULL | NULL | | | do_models | table | NULL | NULL | | | do_prompt | scalar | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------------------|------------------------------------------------------------------------------------------------|------------|--------|---------|----------------------| | do_decide_model | Model used by do_decide | VARCHAR | GLOBAL | [] | typesafe-jev-1.13.0 | | do_embed_model | Model used by do_embed | VARCHAR | GLOBAL | [] | qwen3-embedding-0.6b | | do_max_concurrent_requests | Maximum inference requests in flight at once, shared by all threads | BIGINT | GLOBAL | [] | 32 | | do_model_access_key | DigitalOcean model access key. Leave unset to use the DO_MODEL_ACCESS_KEY environment variable | VARCHAR | GLOBAL | [] | NULL | | do_prompt_model | Model used by do_prompt | VARCHAR | GLOBAL | [] | deepseek-4-flash | | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |