Skip to main content

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 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_user your messages
  • #| chat_assistant the 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

ipy_yasi-0.1.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipy_yasi-0.1.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file ipy_yasi-0.1.1.tar.gz.

File metadata

  • Download URL: ipy_yasi-0.1.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ipy_yasi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 86e4b02008fece6d9232b99f13735c8297ae383e8d8c8373c5a783d678479c6b
MD5 9c69aa3edf2f80df56e78c3ea82ac167
BLAKE2b-256 f2b11790a1b7239875eabe1ae5cede7d0f49f5df529cf6249b8822f1a4e0817d

See more details on using hashes here.

File details

Details for the file ipy_yasi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ipy_yasi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for ipy_yasi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43a54a70dd797492a9b7173814684a98d6ba00ae2aac5b9a4f31438fe72c8c46
MD5 ec566023181f204d00109c618ddec2df
BLAKE2b-256 aa6eb85fa1cea9b05effcf4f69a216ada51bfdc37d31ac804a19e196afb2daaf

See more details on using hashes here.

Supported by

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