Skip to main content

Jupyter magic command for having AI chat conversations in a notebook

Project description

!pip install jupyter-aichat
%load_ext jupyter_aichat
%%say
I've created an AI chat user interface for Jupyter notebooks.
It adds the `%say` and `%%say` magic commands for writing messages,
renders response messages in the notebook,
and keeps the whole conversation in memory.

That sounds really interesting! Can you tell me more about how it works and what kind of AI it uses?

%%say
The user just types `%say "<message>"` or `%%say` followed by a multi-line message.
It asks for the ChatGPT API key before sending the first message.
Both sent messages and received messages are kept in memory
and the whole message history is submitted every time the magic command is used.
The response from ChatGPT is rendered as Markdown.

That sounds really convenient! And what exactly is ChatGPT and how does it generate responses?

%say "I think you know that best yourself :)"

As an AI language model, I don’t know everything about what specific tools or algorithms you’ve used in the creation of your AI chat user interface. However, generally speaking, GPT (Generative Pre-trained Transformer) is a type of language model that uses deep learning to generate human-like text. ChatGPT is a variant of GPT specifically designed for chatbots and conversational agents, and it has been trained on vast amounts of existing human conversations to learn how to simulate natural language interactions. When a user inputs a message, ChatGPT uses this training to generate an appropriate response based on the context of the conversation.

%%say
Thanks for the summary!
I'm publishing this on GitHub and putting this very discussion as the README.

That sounds like a great idea! Having a clear explanation of how the chat interface works and the technology it uses will help make it more accessible to potential users. Good luck with your project!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_aichat-0.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

jupyter_aichat-0.0.1-py2.py3-none-any.whl (3.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file jupyter_aichat-0.0.1.tar.gz.

File metadata

  • Download URL: jupyter_aichat-0.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.2

File hashes

Hashes for jupyter_aichat-0.0.1.tar.gz
Algorithm Hash digest
SHA256 219eb29abb4bbfa2168cb71a487e8ff5bd83f13b52210a677606ff1d6a8637d1
MD5 a3e52bcf19ded97be5bc2dc8d8462c19
BLAKE2b-256 4ebda6c774e9663c67a508d7b7bf68184d987ebfead3634a51f0fa4f06c50b38

See more details on using hashes here.

File details

Details for the file jupyter_aichat-0.0.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_aichat-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 19e5d0a3c367c75f040804d4f686c228d3e73a14942fc68339288e5d132e5ac7
MD5 21af83a0a67f2319ade300fa4775f0c6
BLAKE2b-256 6f3844fb461dca57b2e93ca6fb6a00de1c0650268facdad5b7ce90f4c9b076d3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page