DIY alternative to solve it from fast.ai (Yet-Another-SolveIt)
Project description
yasi
Background
What if you could have a more fluid, interactive conversation with AI? Enter Dialog Engineering, a groundbreaking approach that lets you construct and edit a dialogue with the AI in real-time.
Unlike prompt engineering where you’re just creating a single sentence or paragraph or whatever, that’s actually part of a whole back and forth dialog. All of the previous steps get sent to the AI model as well, not just the prompt. And they all greatly influence how it responds. And how it responds influences you as to what you then add to the dialog. - Jeremy Howard, from the MAD Podcast 34:42
Yasi seamlessly integrates Jupyter Notebooks with AI to unlock the potential of Dialog Engineering. With yasi, you can create, edit, and refine your conversations with AI. It is a DIY implementation of the - yet to be released - platform solveit from answer.ai.
For more information see the following articles:
Usage
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/Jack-Byte/yasi.git
or from pypi
$ pip install ipy-yasi
Documentation
Documentation can be found hosted on this GitHub repository’s pages. Additionally you can find package manager specific guidelines on conda and pypi respectively.
How to use
You can try it online with Binder
Import JupyterChat, set openai_base_url (only if you are not using
Openai itself), and provide your api key directly or as the env variable
OPENAI_API_KEY.
from yasi.core import JupyterChat
jc = JupyterChat(openai_base_url="https://openrouter.ai/api/v1", api_key=None)
Query Openai directly
You can use the send_query method to interacte through a code cell
directly. The response will be added as a new markdown cell in your
current notebook.
jc.send_query('Kia ora, how are you?')
Kia ora! I’m doing well, thanks for asking! It’s great to connect with you and practice some basic Maori phrases. How can I help you today?
Send Dialoge from your Notebook
JupyterChat is designed to extract messages from your current notebook and construct a dialoge.
It’s searching for markdown cells that contain the tags
#| chat_system(optional) sets the context for the conversation, providing the AI with a “hint” about the type of response expected#| chat_useryour messages#| chat_assistantthe AIs real responses, or the ones that you ingest into the dialog
and sends the dialog to the Openai API.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ipy_yasi-0.1.2.tar.gz.
File metadata
- Download URL: ipy_yasi-0.1.2.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a5e8c904f4c8dbd4c36a78f45f5e9616ec9990055e9e0b02167babaec25c3dd
|
|
| MD5 |
bb59cde6d02698b7c9bb451970264871
|
|
| BLAKE2b-256 |
848a26e4906f60db6c61c701ffd7a183e98f271c92f0770fd51f015484920b33
|
File details
Details for the file ipy_yasi-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ipy_yasi-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb709416f77eea7c27318c83c1add4fc8e6a61a819183d442865281ae7850879
|
|
| MD5 |
624f559a348e647da3cc52940956d75a
|
|
| BLAKE2b-256 |
1d404692ef45d2c494aad6f0eb15fcfc004285aa1498c7c2c789800fbceb18b9
|