-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(text_to_sql): anthropic working with tool use. other providers s…
…tubbed out
- Loading branch information
Showing
8 changed files
with
294 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
projects/extension/sql/idempotent/907-text-to-sql-ollama.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--FEATURE-FLAG: text_to_sql | ||
|
||
------------------------------------------------------------------------------- | ||
-- _text_to_sql_ollama | ||
create function ai._text_to_sql_ollama | ||
( question text | ||
, catalog_name text default 'default' | ||
, max_results bigint default 5 | ||
, max_vector_dist float8 default null | ||
, min_ts_rank real default null | ||
, max_iter int2 default 3 | ||
, obj_renderer regprocedure default ('ai.render_semantic_catalog_obj(bigint, oid, oid)'::pg_catalog.regprocedure) | ||
, sql_renderer regprocedure default ('ai.render_semantic_catalog_sql(bigint, text, text)'::pg_catalog.regprocedure) | ||
, config jsonb default null -- TODO: use this for LLM configuration | ||
) returns jsonb | ||
as $func$ | ||
declare | ||
begin | ||
raise exception 'not implemented yet'; | ||
end | ||
$func$ language plpgsql stable security invoker | ||
set search_path to pg_catalog, pg_temp | ||
; |
Oops, something went wrong.