-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scratch_notebooks): add notebook to demonstrate URL markdown issue
- Added a new Jupyter notebook `url-markdown-issue.ipynb` in the `scratch_notebooks` directory. This notebook includes a demonstration of handling URLs within markdown strings using the Panel library. refactor(scratch_notebooks): remove obsolete cache prototype notebook - Removed the `cache.ipynb` notebook from the `scratch_notebooks` directory as it was deemed obsolete and no longer necessary for the project's current scope.
- Loading branch information
Showing
2 changed files
with
58 additions
and
262 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,58 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"%load_ext autoreload\n", | ||
"%autoreload 2" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"import panel as pn\n", | ||
"\n", | ||
"\n", | ||
"string = \"hey, this is a [URL](https://www.google.com). Can you see it?\"\n", | ||
"\n", | ||
"\n", | ||
"async def generate_text(msg, user, instance):\n", | ||
" m = \"\"\n", | ||
" for s in string:\n", | ||
" m += s\n", | ||
" yield m\n", | ||
"\n", | ||
"\n", | ||
"chat = pn.chat.ChatInterface(callback=generate_text, callback_exception=\"verbose\")\n", | ||
"chat.servable()" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "llamabot", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.11.8" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |