You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md
+16-18Lines changed: 16 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -41,8 +41,8 @@ The Switch Kit is an open-source AI SDK that provides a drop in replacement for
41
41
{% tabs %}
42
42
{% tab title="JavaScript" %}
43
43
```javascript
44
-
constpgml=require("pgml");
45
-
constclient=pgml.newOpenSourceAI();
44
+
constkorvus=require("korvus");
45
+
constclient=korvus.newOpenSourceAI();
46
46
constresults=client.chat_completions_create(
47
47
"meta-llama/Meta-Llama-3-8B-Instruct",
48
48
[
@@ -62,8 +62,8 @@ console.log(results);
62
62
63
63
{% tab title="Python" %}
64
64
```python
65
-
importpgml
66
-
client =pgml.OpenSourceAI()
65
+
importkorvus
66
+
client =korvus.OpenSourceAI()
67
67
results = client.chat_completions_create(
68
68
"meta-llama/Meta-Llama-3-8B-Instruct",
69
69
[
@@ -117,17 +117,15 @@ The above is an example using our open-source AI SDK with Meta-Llama-3-8B-Instru
117
117
118
118
Notice there is near one to one relation between the parameters and return type of OpenAI’s `chat.completions.create` and our `chat_completion_create`.
119
119
120
-
The best part of using open-source AI is the flexibility with models. Unlike OpenAI, we are not restricted to using a few censored models, but have access to almost any model out there.
121
-
122
-
Here is an example of streaming with the popular Mythalion model, an uncensored MythoMax variant designed for chatting.
@@ -212,15 +210,15 @@ We have truncated the output to two items
212
210
213
211
!!!
214
212
215
-
We also have asynchronous versions of the create and `create_stream` functions relatively named `create_async` and `create_stream_async`. Checkout [our documentation](https://postgresml.org/docs/introduction/machine-learning/sdks/opensourceai) for a complete guide of the open-source AI SDK including guides on how to specify custom models.
213
+
We also have asynchronous versions of the create and `create_stream` functions relatively named `create_async` and `create_stream_async`. Checkout [our documentation](https://postgresml.org/docs/guides/opensourceai) for a complete guide of the open-source AI SDK including guides on how to specify custom models.
216
214
217
-
PostgresML is free and open source. To run the above examples yourself[create an account](https://postgresml.org/signup), install pgml, and get running!
215
+
PostgresML is free and open source. To run the above examples yourself[create an account](https://postgresml.org/signup), install korvus, and get running!
218
216
219
217
### Why use open-source models on PostgresML?
220
218
221
219
PostgresML is a complete MLOps platform in a simple PostgreSQL extension. It’s the tool our team wished they’d had scaling MLOps at Instacart during its peak years of growth. You can host your database with us or locally. However you want to engage, we know from experience that it’s better to bring your ML workload to the database rather than bringing the data to the codebase.
222
220
223
-
Fundamentally, PostgresML enables PostgreSQL to act as a GPU-powered AI application database — where you can both save models and index data. That eliminates the need for the myriad of separate services you have to tie together for your ML workflow. Pgml + pgvector create a complete ML platform (vector DB, model store, inference service, open-source LLMs) all within open-source extensions for PostgreSQL. That takes a lot of the complexity out of your infra, and it's ultimately faster for your users.
221
+
Fundamentally, PostgresML enables PostgreSQL to act as a GPU-powered AI application database — where you can both save models and index data. That eliminates the need for the myriad of separate services you have to tie together for your ML workflow. pgml + pgvector create a complete ML platform (vector DB, model store, inference service, open-source LLMs) all within open-source extensions for PostgreSQL. That takes a lot of the complexity out of your infra, and it's ultimately faster for your users.
224
222
225
223
We're bullish on the power of in-database and open-source ML/AI, and we’re excited for you to see the power of this approach yourself. You can try it out in our serverless database for $0, with usage based billing starting at just five cents an hour per GB GPU cache. You can even mess with it for free on our homepage.
0 commit comments