Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit664085c

Browse files
Silas Marvingitbook-bot
Silas Marvin
authored andcommitted
GITBOOK-12: Switch Mistral Model
1 parent7f198a0 commit664085c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎pgml-cms/blog/introducing-the-openai-switch-kit-move-from-closed-to-open-source-ai-in-minutes.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The Switch Kit is an open-source AI SDK that provides a drop in replacement for
4141
import pgml
4242
client= pgml.OpenSourceAI()
4343
results= client.chat_completions_create(
44-
"mistralai/Mistral-7B-Instruct-v0.1",
44+
"HuggingFaceH4/zephyr-7b-beta",
4545
[
4646
{
4747
"role":"system",
@@ -63,7 +63,7 @@ print(results)
6363
constpgml=require("pgml");
6464
constclient=pgml.newOpenSourceAI();
6565
constresults=client.chat_completions_create(
66-
"mistralai/Mistral-7B-Instruct-v0.1",
66+
"HuggingFaceH4/zephyr-7b-beta",
6767
[
6868
{
6969
role:"system",
@@ -93,7 +93,7 @@ console.log(results);
9393
],
9494
"created":1701291672,
9595
"id":"abf042d2-9159-49cb-9fd3-eef16feb246c",
96-
"model":"mistralai/Mistral-7B-Instruct-v0.1",
96+
"model":"HuggingFaceH4/zephyr-7b-beta",
9797
"object":"chat.completion",
9898
"system_fingerprint":"eecec9d4-c28b-5a27-f90b-66c3fb6cee46",
9999
"usage": {
@@ -108,7 +108,7 @@ console.log(results);
108108
We don't charge per token, so OpenAI “usage” metrics are not particularly relevant. We'll be extending this data with more direct CPU/GPU resource utilization measurements for users who are interested, or need to pass real usage based pricing on to their own customers.
109109
{% endhint %}
110110

111-
The above is an example using our open-source AI SDK withmistral, an incredibly popular and highly efficient 7 billion parameter model.
111+
The above is an example using our open-source AI SDK withzephyr-7b-beta, an incredibly popular and highly efficient 7 billion parameter model.
112112

113113
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`.
114114

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp