Source
Source code for yetanothersolveit
JupyterChat
JupyterChat (api_key:str=None, openai_base_url:str=None, model:str=None, tag_system:str='#| chat_system', tag_user:str='#| chat_user', tag_assistant:str='#| chat_assistant')
Integrates a chatbot into JupyterLab, allowing users to interact with an OpenAI model directly within notebooks.
Type | Default | Details | |
---|---|---|---|
api_key | str | None | api key for the openai api |
openai_base_url | str | None | base url of the openai api |
model | str | None | model id for the openai api |
tag_system | str | #| chat_system | tag for system chat markdown cells |
tag_user | str | #| chat_user | tag for user chat markdown cells |
tag_assistant | str | #| chat_assistant | tag for assistant chat markdown cells |
tag_in_cell
tag_in_cell (cell, tag)
Checks a Jupyter Notebook cells source, if any line starts with the given tag
Type | Details | |
---|---|---|
cell | Dictonary of a Jupyter Notebook cell | |
tag | The tag to search | |
Returns | bool | True if any line contains the given tag |