Skip to content

stefanbringuier/Hermes.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hermes.jl

Stable Dev Build Status

An inline AI code messenger for Pluto.jl notebooks.

This utility provides access to OpenAI models to have julia code generated via a prompt. Code can be returned as formatted text which can be copied or code can be executed.

Why Hermes

Pluto, the god of the underworld, was informed by Hermes, the messenger among the gods, who brought forth to him those unfortunate souls.

Usage

🎥 Example Recording

using Hermes
Hermes.OPENAI(apikey="YOUR_KEY",model="GPT_MODEL")
hermes"""
I need a function for the square exponential kernel given two vectors. Name the function `sqe_kernel`
hermes"""
Define variables $x_i$ where $i \in {1,2,...,5}$ and assign them the values of their index
"""

Issues

  • At the moment the OpenAI details, i.e., model and API key, are stored in a global variable of type NamedTuple{(:apikey, :model), Tuple{String, String}} this isn't optimal, for a few reasons. Will need to come-up with an improved solution.
  • Since this utility only provides an interface to OpenAI models without any other tooling (i.e., LangChain), a Hermes.INSTRUCT variable is used to guide the AI to focus only on Julia code for Pluto.jl cells. Therefore other inquires may be dubious.

Vision

The current implementation only provides returned messages within the executed cell. The returned messages can be either shown as formatted text (@hermes) or executed (@hermes_exe), but these are tied toth e runtime Pluto cell. What would be ideal is some javascript that would enable the macro calls to place markdown or julia code in a cell below the cell that makes the call request.

On another note, only OpenAI api interface is available, but this should be the case for a robust implementation.

Contribution

More advance Julia and Javascript devs who can improve the design and functionality of this package are very much appreciated to contribute or fork.