← 开源
santiagobasulto

ipython-gpt

An ChatGPT integration for Jupyter Notebooks and the IPython Shell

ApplicationsCodingPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
577
Star
38
Fork
+-2
本周
3
贡献者
创建于 2023-04-15 · 更新于 2026-10-11 · 今日第 16701 名
主要开发者
12rambausantiagobasultokxxt

santiagobasulto/ipython-gpt 排名第 16,701,有 577 个星标。

同类别比较

santiagobasulto/ipython-gpt 排名第 16,701,此处有 8 个同类条目;zarazhangrui/youtube-to-ebook 排名第 16,704。

同类别比较
名称排名指标
JeremiahPetersen/RepoToText16,652
语言:
Python
星标数:
579
分叉数:
65
简介:
Turn an entire GitHub Repo into a single organized .txt file to use with LLM's (ChatGPT, Claude, Gemini, etc)
kochlisGit/ProphitBet-Soccer-Bets-Predictor16,660
语言:
Python
星标数:
579
分叉数:
162
简介:
ProphitBet is a Machine Learning Soccer Bet prediction application. It analyzes the form of teams, computes match statistics and predicts the outcomes of a match using Advanced Machine Learning (ML) methods. The supported algorithms in this application are Neural Networks, Random Forests & Ensembl Models.
google-deepmind/ithaca16,674
语言:
Jupyter Notebook
星标数:
578
分叉数:
65
简介:
Restoring and attributing ancient texts using deep neural networks
efugier/smartcat16,691
语言:
Rust
星标数:
577
分叉数:
33
简介:
Putting a brain behind `cat`🐈‍⬛ Integrating language models in the Unix commands ecosystem through text streams.
zarazhangrui/youtube-to-ebook16,704
语言:
Python
星标数:
577
分叉数:
122
简介:
Claude skill for turning YouTube transcripts from your favorite channels into EPUB ebooks, delivered to your email inbox regularly
LemonQu-GIT/ChatGLM-6B-Engineering16,706
语言:
Python
星标数:
576
分叉数:
98
简介:
ChatGLM-6B Prompt Engineering Project
laigeoffer/pmhub16,715
语言:
Java
星标数:
576
分叉数:
192
简介:
PmHub,一个基于 SpringCloud & LLM 的智能项目管理系统,该项目旨在帮助小伙伴们快速掌握微服务/分布式项目的架构设计和开发流程。如果你想在校招或者社招中拿到一个满意的 offer,PmHub 将是一个非常 nice 的选择😄。
zhulin025/Codex-QQ-Skin16,720
语言:
JavaScript
星标数:
576
分叉数:
58
简介:
Codex 皮肤生成器(内置沉浸式女友、复古 QQ 风格)
关键参数与规格
关键参数与规格
参数值
语言Python
类别Applications
子类别Coding
关键词IDE
星标数577
分叉数38
贡献者3
创建日期2023-04-15
更新日期2026-10-11
1 天星标数0
7 天星标数-2
排名16,701
上次排名16,488
排名变化-213
7 天星标排名18,488
上次 7 天星标排名18,424
7 天星标排名变化-64
总星标排名17,313
上次总星标排名17,283
总星标排名变化-30
国家Italy
README 摘录

IPython ChatGPT extension This (standalone, no external dependencies required) extension allows you to use ChatGPT directly from your Jupyter Notebook or IPython Shell (Demo). ** This is a very early and raw version, I have a lot of things to improve regarding code quality and missing functionality. Installation Then in your notebook or ipython shell: Setup You must first generate an API key at OpenAI ( and set is an environment variable . You can do it by modifying your or starting jupyter

with it: If you're working on Google Colab, you can use the magic method (keep in mind that if you don't delete the cell, your key will be visible): There are a few other ways to set the API KEY, but the envvar is the recommended one. ChatGPT API The command interfaces with ChatGPT. It accepts multiple parameters (see Usage). Here's an example: **Important** by default, the command preserves the conversation to give the Agent some context, in the same

way that ChatGPT works. You can "reset" its status passing the flag . Agent's role (system message) and other chat parameters By default, the Chat is started with the role: _"You're a python data science coding assistant"_. You can change that by passing something different in your first : Once the conversation has started, you can't change the original message, as the context is preserved. To do so, you must reset the conversation: Setting global config You can change the defaults using

the line magic: Invoke it without parameters to see the defaults set: Other methods Display available models Usage: Available models: Display usage and accepted parameters Alternative authentication Aside from setting the environment variable, you can also set as a global variable in your notebook, or pass it directly as a parameter in any method . These alternative methods are NOT recommended, as you might leak your API Key in the notebooks' history, stored in .

常见问题

记录了多少星标和分叉?

santiagobasulto/ipython-gpt 有 577 个星标和 38 个分叉。

仓库排名是多少?

santiagobasulto/ipython-gpt 排名第 16,701。

记录的语言和类别是什么?

santiagobasulto/ipython-gpt 有 577 个星标,语言为 Python,类别为 Applications。

哪个仓库排名最接近?

santiagobasulto/ipython-gpt 与 zarazhangrui/youtube-to-ebook 比较,后者排名第 16,704,有 577 个星标。

README

IPython ChatGPT extension

This (standalone, no external dependencies required) extension allows you to use ChatGPT directly from your Jupyter Notebook or IPython Shell (Demo).

Important! This is a very early and raw version, I have a lot of things to improve regarding code quality and missing functionality. Check this issue for a rough "roadmap".

Installation

!pip install ipython-gpt

Then in your notebook or ipython shell:

%load_ext ipython_gpt

Setup

You must first generate an API key at OpenAI (https://platform.openai.com/account/api-keys) and set is an environment variable OPENAI_API_KEY. You can do it by modifying your .bashrc/.zshrc or starting jupyter with it:

$ OPENAI_API_KEY=[YOUR-KEY] jupyter lab
# ...
$ OPENAI_API_KEY=[YOUR-KEY] ipython

If you're working on Google Colab, you can use the %env magic method (keep in mind that if you don't delete the cell, your key will be visible):

%env OPENAI_API_KEY=sk-W8b0... your key ...

There are a few other ways to set the API KEY, but the envvar is the recommended one.

ChatGPT API

The command %%chat interfaces with ChatGPT. It accepts multiple parameters (see Usage). Here's an example:

%%chat --max-tokens=25

What's the purpose of life?
...

>>> CHAT RESPONSE

Important by default, the %%chat command preserves the conversation to give the Agent some context, in the same way that ChatGPT works. You can "reset" its status passing the flag --reset-conversation.

%%chat --reset-conversation

How can I avoid pandas using scientific notation in outputs, and do it globally?
...
...
>>> CHAT RESPONSE

Agent's role (system message) and other chat parameters

By default, the Chat is started with the role: "You're a python data science coding assistant". You can change that by passing something different in your first %%chat:

%%chat --system-message="You're a R Data Science assistant"

Your message...

Once the conversation has started, you can't change the original message, as the context is preserved. To do so, you must reset the conversation:

%%chat --system-message="You're a R Data Science assistant" --reset-conversation

Your message...

Setting global config

You can change the defaults using the %chat_config line magic:

%chat_config --system-message="You're an R data scientist coding assistant specialized in visualizations" --model "other model" --reset-conversation

Invoke it without parameters to see the defaults set:

%chat_config
...

>>>
##### Conf set:

* **Default model**: gpt-3.5-turbo
* **Default system message**: You're a python data science coding assistant
* **Chat history length**: 0

Other methods

Display available models

Usage:

%chat_models [--all-models]
%chat_models
Available models:
- gpt-3.5-turbo-0301
- gpt-3.5-turbo

Display usage and accepted parameters

%reload_ext ipython_gpt
%chat_help
...


    usage: ipykernel_launcher.py [-h] [--openai-api-key OPENAI_API_KEY]
                                 [--reset-conversation]
                                 [--system-message SYSTEM_MESSAGE]
                                 [--no-system-message] [--model MODEL]
                                 [--temperature TEMPERATURE]
                                 [--max-tokens MAX_TOKENS] [--all-models]

Alternative authentication

Aside from setting the environment variable, you can also set OPENAI_API_KEY as a global variable in your notebook, or pass it directly as a parameter in any method --openai-api-key=YOUR-KEY.

These alternative methods are NOT recommended, as you might leak your API Key in the notebooks' history, stored in .ipynb_checkpoints.

排名相邻
同类项目