docs: fix some notebook formatting (#21136)

This commit is contained in:
Erick Friis 2024-04-30 21:39:03 -07:00 committed by GitHub
parent 5a8909440b
commit 67e6744e0f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 31 deletions

View File

@ -24,19 +24,11 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 6, "execution_count": 1,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
"outputs": [ "outputs": [],
{
"name": "stdout",
"output_type": "stream",
"text": [
" ········\n"
]
}
],
"source": [ "source": [
"# get a new token: https://deepinfra.com/login?from=%2Fdash\n", "# get a new token: https://deepinfra.com/login?from=%2Fdash\n",
"\n", "\n",
@ -47,7 +39,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 7, "execution_count": 2,
"metadata": { "metadata": {
"tags": [] "tags": []
}, },
@ -61,7 +53,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 3,
"id": "d4a7c55d-b235-4ca4-a579-c90cc9570da9", "id": "d4a7c55d-b235-4ca4-a579-c90cc9570da9",
"metadata": { "metadata": {
"tags": [] "tags": []
@ -74,7 +66,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 2, "execution_count": 4,
"id": "70cf04e8-423a-4ff6-8b09-f11fb711c817", "id": "70cf04e8-423a-4ff6-8b09-f11fb711c817",
"metadata": { "metadata": {
"tags": [] "tags": []
@ -109,7 +101,7 @@
" content=\"Translate this sentence from English to French. I love programming.\"\n", " content=\"Translate this sentence from English to French. I love programming.\"\n",
" )\n", " )\n",
"]\n", "]\n",
"chat(messages)" "chat.invoke(messages)"
] ]
}, },
{ {
@ -123,7 +115,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 4, "execution_count": 5,
"id": "93a21c5c-6ef9-4688-be60-b2e1f94842fb", "id": "93a21c5c-6ef9-4688-be60-b2e1f94842fb",
"metadata": { "metadata": {
"tags": [] "tags": []
@ -188,16 +180,8 @@
" verbose=True,\n", " verbose=True,\n",
" callbacks=[StreamingStdOutCallbackHandler()],\n", " callbacks=[StreamingStdOutCallbackHandler()],\n",
")\n", ")\n",
"chat(messages)" "chat.invoke(messages)"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"id": "c253883f",
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {

View File

@ -16,7 +16,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 1,
"id": "9ec8a3b3", "id": "9ec8a3b3",
"metadata": { "metadata": {
"tags": [] "tags": []
@ -28,14 +28,15 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"outputs": [], "execution_count": 2,
"source": [ "id": "2ea958f0327ed6e8",
"loader = YuqueLoader(access_token=\"<your_personal_access_token>\")"
],
"metadata": { "metadata": {
"collapsed": false "collapsed": false
}, },
"id": "2ea958f0327ed6e8" "outputs": [],
"source": [
"loader = YuqueLoader(access_token=\"<your_personal_access_token>\")"
]
}, },
{ {
"cell_type": "code", "cell_type": "code",
@ -69,7 +70,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.6" "version": "3.11.4"
} }
}, },
"nbformat": 4, "nbformat": 4,