In this engaging talk, Elijah unravels the process of building a ChatGPT plugin using Python, focusing on utilizing Jupyter and FastAPI. He navigates through the process, illustrating how Jupyter can execute Python code and how FastAPI plays a crucial role in building APIs. Further, he provides an intricate understanding of implementing OAuth with Auth0, underlining its importance in enabling secure user authentication and authorization in the plugin.
How to Troubleshoot Apps for the Modern Connected Worker
JupyChat - Michigan Python
1. 📓 JupyChat
Writing a ChatGPT plugin in Python that executes Python
Elijah Wilson tizz98
2. Me 👋
Elijah (Eli) Wilson
Staff Software Engineer & Tech Lead
at Noteable.io
A person with too many side projects
Lives in Brighton, MI
tizz98
@elijahwilson@fosstodon.org
5. JupyChat plugin
● Authenticate with OAuth using
Auth0
● Execute code using Jupyter
● Show images from results of
queries, such as charts
6. What goes into a
plugin?
1. Authentication
2. OpenAPI specification
All of this is defined in a single file for
ChatGPT to discover: ai-plugin.json.
7. High Level
Architecture
● User interacts with ChatGPT
● ChatGPT calls our API using
known endpoints from OpenAPI
document
● Our FastAPI server creates and
runs Jupyter notebooks using
ZMQ
8. ai-plugin.json
Here’s what we have so far…
● offline_access allows for
refresh tokens
● openai
verification_tokens will
be provided by OpenAI after
installing the plugin
● is_user_authenticated
should be dynamic
14. Ethics in AI:
Implications for
ChatGPT Plugins
● Ethical considerations specific
to ChatGPT plugins
● Importance of safeguards in
plugin design
● Balancing utility and safety
15. Noteable.io Plugin
● Build Jupyter notebooks without
running Jupyter
● Execute code and get results
back in ChatGPT
● Learn new things!
● Get started at
https://app.noteable.io
https://www.youtube.com/watch?v=Vmg3gBNCYPw
Ethics play a crucial role in the development and deployment of Artificial Intelligence. It is important to consider and address ethical issues to ensure the responsible use of AI. Key ethical principles in AI include:
Transparency: AI systems should be transparent and explainable.
Fairness: AI systems should not result in unfair outcomes and should avoid perpetuating biases.
Privacy: AI systems should respect the privacy of individuals and handle data responsibly.
Accountability: There should be mechanisms for holding AI systems and their operators accountable for their actions.
However, there are potential ethical challenges associated with AI, such as:
Bias: AI systems can unintentionally perpetuate or even exacerbate existing societal biases.
Misuse: There is a risk of AI technologies being used in harmful or malicious ways.
Privacy breaches: The use of large datasets can potentially lead to privacy breaches and misuse of personal data.
When it comes to ChatGPT plugins, there are certain ethical considerations that are particularly relevant.
First, it is important to design safeguards into plugins to prevent misuse and harmful actions. For example, there could be risks associated with plugins taking harmful or unintended actions, increasing the capabilities of bad actors, or misusing information sent to the plugin. To mitigate these risks, safeguards need to be implemented in the plugin design from day one1.
Balancing utility and safety is also crucial. While plugins can greatly enhance the utility of ChatGPT by giving it access to up-to-date information, enabling it to run computations, or use third-party services, it is important to ensure that these capabilities do not compromise the safety and privacy of users1.
Lastly, transparency is key. Users should be able to understand how and when plugins are operating as part of the user experience1.