Skip to content

Added OpenSourceAI and conversational support in the extension #1206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 1, 2023
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3ff2f07
Added OpenSourceAI and conversational support in the extension
SilasMarvin Nov 22, 2023
1ca5dc8
Clean up errors and guard rails around conversational api
SilasMarvin Nov 22, 2023
b6b7ec6
Not great, pivoting to better solution after talking with Santi
SilasMarvin Nov 28, 2023
be4788a
Working conversational everything
SilasMarvin Nov 28, 2023
719fdc5
Fixed typo
SilasMarvin Nov 28, 2023
23ef2a3
Working non streaming open source ai replacement
SilasMarvin Nov 28, 2023
dedf434
Remove outdated comment
SilasMarvin Nov 28, 2023
f3d8e1f
Working OpenSourceAI with both sync and async options
SilasMarvin Nov 29, 2023
2969c89
Cleaned up and tested well
SilasMarvin Nov 29, 2023
3b26743
Completely removed the GPTQ pipeline as it is no longer necessary
SilasMarvin Nov 29, 2023
cf1afc6
Removed unnecessary python imports
SilasMarvin Nov 29, 2023
accd159
Removed universal debugger output
SilasMarvin Nov 30, 2023
e5eccec
Finalized models in SDK for open source ai
SilasMarvin Dec 1, 2023
95e1e9a
Updated to work with hugging face tokens
SilasMarvin Dec 1, 2023
c80817b
Finalized models in SDK for open source ai
SilasMarvin Dec 1, 2023
9a3ca91
Removed unnecessary comment
SilasMarvin Dec 1, 2023
4eb88f8
Put back the GGML pipeline and removed the GPTQ pipeline earlier comm…
SilasMarvin Dec 1, 2023
93e7ffb
Changed some error messages
SilasMarvin Dec 1, 2023
73ee33a
Added migration for 2.8.1
SilasMarvin Dec 1, 2023
0201880
Working migration file
SilasMarvin Dec 1, 2023
47c18d6
Really working migration file
SilasMarvin Dec 1, 2023
fb3f7f7
Bumped version
SilasMarvin Dec 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Working migration file
  • Loading branch information
SilasMarvin committed Dec 1, 2023
commit 0201880e28a987093dadfe7bbe1d37f08b7a60f9
20 changes: 11 additions & 9 deletions pgml-extension/sql/pgml--2.8.0--2.8.1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
CREATE OR REPLACE FUNCTION pgml."transform"(
"task" jsonb, /* pgrx::datum::json::JsonB */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
"inputs" jsonb[] DEFAULT 'ARRAY[]::JSONB[]', /* Vec<pgrx::datum::json::JsonB> */
"inputs" jsonb[] DEFAULT ARRAY[]::JSONB[], /* Vec<pgrx::datum::json::JsonB> */
"cache" bool DEFAULT false /* bool */
) RETURNS jsonb /* alloc::string::String */
IMMUTABLE STRICT PARALLEL SAFE
Expand All @@ -13,14 +13,15 @@ AS 'MODULE_PATHNAME', 'transform_conversational_json_wrapper';
CREATE OR REPLACE FUNCTION pgml."transform"(
"task" TEXT, /* alloc::string::String */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
"inputs" jsonb[] DEFAULT 'ARRAY[]::JSONB[]', /* Vec<pgrx::datum::json::JsonB> */
"inputs" jsonb[] DEFAULT ARRAY[]::JSONB[], /* Vec<pgrx::datum::json::JsonB> */
"cache" bool DEFAULT false /* bool */
) RETURNS jsonb /* alloc::string::String */
IMMUTABLE STRICT PARALLEL SAFE
LANGUAGE c /* Rust */
AS 'MODULE_PATHNAME', 'transform_conversational_string_wrapper';

-- pgml::api::transform_stream
-- pgml::api::transform_stream_string
DROP FUNCTION IF EXISTS pgml."transform_stream"(text,jsonb,text,boolean);
CREATE OR REPLACE FUNCTION pgml."transform_stream"(
"task" TEXT, /* alloc::string::String */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
Expand All @@ -29,9 +30,10 @@ CREATE OR REPLACE FUNCTION pgml."transform_stream"(
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */
IMMUTABLE STRICT PARALLEL SAFE
LANGUAGE c /* Rust */
AS 'MODULE_PATHNAME', 'transform_stream_string_wrapper_wrapper';
AS 'MODULE_PATHNAME', 'transform_stream_string_wrapper';

-- pgml::api::transform_stream
-- pgml::api::transform_stream_json
DROP FUNCTION IF EXISTS pgml."transform_stream"(jsonb,jsonb,text,boolean);
CREATE OR REPLACE FUNCTION pgml."transform_stream"(
"task" jsonb, /* pgrx::datum::json::JsonB */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
Expand All @@ -40,13 +42,13 @@ CREATE OR REPLACE FUNCTION pgml."transform_stream"(
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */
IMMUTABLE STRICT PARALLEL SAFE
LANGUAGE c /* Rust */
AS 'MODULE_PATHNAME', 'transform_stream_json_wrapper_wrapper';
AS 'MODULE_PATHNAME', 'transform_stream_json_wrapper';

-- pgml::api::transform_stream_conversational_json
CREATE OR REPLACE FUNCTION pgml."transform_stream"(
"task" TEXT, /* alloc::string::String */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
"inputs" jsonb[] DEFAULT 'ARRAY[]::JSONB[]', /* Vec<pgrx::datum::json::JsonB> */
"inputs" jsonb[] DEFAULT ARRAY[]::JSONB[], /* Vec<pgrx::datum::json::JsonB> */
"cache" bool DEFAULT false /* bool */
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */
IMMUTABLE STRICT PARALLEL SAFE
Expand All @@ -57,9 +59,9 @@ AS 'MODULE_PATHNAME', 'transform_stream_conversational_string_wrapper';
CREATE OR REPLACE FUNCTION pgml."transform_stream"(
"task" jsonb, /* pgrx::datum::json::JsonB */
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */
"inputs" jsonb[] DEFAULT 'ARRAY[]::JSONB[]', /* Vec<pgrx::datum::json::JsonB> */
"inputs" jsonb[] DEFAULT ARRAY[]::JSONB[], /* Vec<pgrx::datum::json::JsonB> */
"cache" bool DEFAULT false /* bool */
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */
IMMUTABLE STRICT PARALLEL SAFE
LANGUAGE c /* Rust */
AS 'MODULE_PATHNAME', 'transform_stream_coversational_json_wrapper';
AS 'MODULE_PATHNAME', 'transform_stream_conversational_json_wrapper';