- Notifications
You must be signed in to change notification settings - Fork328
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
22 commits Select commitHold shift + click to select a range
3ff2f07
Added OpenSourceAI and conversational support in the extension
SilasMarvin1ca5dc8
Clean up errors and guard rails around conversational api
SilasMarvinb6b7ec6
Not great, pivoting to better solution after talking with Santi
SilasMarvinbe4788a
Working conversational everything
SilasMarvin719fdc5
Fixed typo
SilasMarvin23ef2a3
Working non streaming open source ai replacement
SilasMarvindedf434
Remove outdated comment
SilasMarvinf3d8e1f
Working OpenSourceAI with both sync and async options
SilasMarvin2969c89
Cleaned up and tested well
SilasMarvin3b26743
Completely removed the GPTQ pipeline as it is no longer necessary
SilasMarvincf1afc6
Removed unnecessary python imports
SilasMarvinaccd159
Removed universal debugger output
SilasMarvine5eccec
Finalized models in SDK for open source ai
SilasMarvin95e1e9a
Updated to work with hugging face tokens
SilasMarvinc80817b
Finalized models in SDK for open source ai
SilasMarvin9a3ca91
Removed unnecessary comment
SilasMarvin4eb88f8
Put back the GGML pipeline and removed the GPTQ pipeline earlier comm…
SilasMarvin93e7ffb
Changed some error messages
SilasMarvin73ee33a
Added migration for 2.8.1
SilasMarvin0201880
Working migration file
SilasMarvin47c18d6
Really working migration file
SilasMarvinfb3f7f7
Bumped version
SilasMarvinFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletionpgml-extension/Cargo.toml
This file contains hidden or 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "pgml" | ||
version = "2.8.1" | ||
edition = "2021" | ||
[lib] | ||
67 changes: 67 additions & 0 deletionspgml-extension/sql/pgml--2.8.0--2.8.1.sql
This file contains hidden or 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,67 @@ | ||
-- pgml::api::transform_conversational_json | ||
CREATE 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> */ | ||
"cache" bool DEFAULT false /* bool */ | ||
) RETURNS jsonb /* alloc::string::String */ | ||
IMMUTABLE STRICT PARALLEL SAFE | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'transform_conversational_json_wrapper'; | ||
-- pgml::api::transform_conversational_string | ||
CREATE 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> */ | ||
"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_string | ||
DROP FUNCTION IF EXISTS pgml."transform_stream"(text,jsonb,text,boolean); | ||
CREATE FUNCTION pgml."transform_stream"( | ||
"task" TEXT, /* alloc::string::String */ | ||
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */ | ||
"input" TEXT DEFAULT '', /* &str */ | ||
"cache" bool DEFAULT false /* bool */ | ||
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */ | ||
IMMUTABLE STRICT PARALLEL SAFE | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'transform_stream_string_wrapper'; | ||
-- pgml::api::transform_stream_json | ||
DROP FUNCTION IF EXISTS pgml."transform_stream"(jsonb,jsonb,text,boolean); | ||
CREATE FUNCTION pgml."transform_stream"( | ||
"task" jsonb, /* pgrx::datum::json::JsonB */ | ||
"args" jsonb DEFAULT '{}', /* pgrx::datum::json::JsonB */ | ||
"input" TEXT DEFAULT '', /* &str */ | ||
"cache" bool DEFAULT false /* bool */ | ||
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */ | ||
IMMUTABLE STRICT PARALLEL SAFE | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'transform_stream_json_wrapper'; | ||
-- pgml::api::transform_stream_conversational_json | ||
CREATE 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> */ | ||
"cache" bool DEFAULT false /* bool */ | ||
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */ | ||
IMMUTABLE STRICT PARALLEL SAFE | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'transform_stream_conversational_string_wrapper'; | ||
-- pgml::api::transform_stream_conversational_string | ||
CREATE 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> */ | ||
"cache" bool DEFAULT false /* bool */ | ||
) RETURNS SETOF jsonb /* pgrx::datum::json::JsonB */ | ||
IMMUTABLE STRICT PARALLEL SAFE | ||
LANGUAGE c /* Rust */ | ||
AS 'MODULE_PATHNAME', 'transform_stream_conversational_json_wrapper'; |
96 changes: 94 additions & 2 deletionspgml-extension/src/api.rs
This file contains hidden or 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
24 changes: 12 additions & 12 deletionspgml-extension/src/bindings/transformers/transform.rs
This file contains hidden or 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
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.