unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Roman Scherer <roman.scherer@burningswell.com>
Cc: emacs-devel@gnu.org,  ahyatt@gmail.com
Subject: Re: Add plz-media-type and plz-event-source to GNU ELPA when stabilized
Date: Sat, 27 Apr 2024 13:43:50 +0000	[thread overview]
Message-ID: <87frv6q5t5.fsf@posteo.net> (raw)
In-Reply-To: <87h6fnmb4b.fsf@burningswell.com> (Roman Scherer's message of "Sat, 27 Apr 2024 11:02:44 +0200")

Roman Scherer <roman.scherer@burningswell.com> writes:

> Hello Emacs Developers,
>
> I am writing you to ask if we could include the ~plz-media-type~ [1]
> and the ~plz-event-source~ [2] libraries to GNU ELPA, once Andrew
> Hyatt and I declare them as releasable.

We can add the libraries to ELPA right now, if you mark the package
version as something that shouldn't be released.  This appears to be the
case right now, as the versions end in -pre.  As soon as you change
this, the packages would be released on ELPA.

The only question I have, from a very superficial understanding, is why
you don't want to upstream these into the library called "plz" itself?
Is that unfeasible or did Adam reject the changes?

Quickly scanning the code made it seem OK, all I would suggest not using
the README for both the repository README file and the manual.  Also, if
possible I'd avoid tracking the generated .info file in the repository
itself.

> At the moment those 2 libraries are "vendored" (we copied 2 files) in
> the llm [3] library. Andrew and I would like to ship them via the llm
> library to users for now, and once we are confident there are no
> serious issues we would like to release them to GNU ELPA. We plan to
> do so in Q4 of 2024.
>
> These libraries are designed to handle HTTP responses based on the
> content type header and process the response in a way specific to the
> media type. One example of this is to process a HTTP response in the
> text/event-stream format (aka server sent events) and handle the
> events as they arrive.
>
> Both libraries use Adam Porter's plz library and I wrote them to
> support Andrew Hyatt in his work on the llm library. We are planning
> to add support to the llm library to make HTTP requests with
> curl. This should solve reliability issues that Andrew saw, and allows
> me to use the llm library with LLMs that sit behind the proxy of my
> employer, who supported my work on this.
>
> They also simplified the code in the llm library that handles the
> various response formats that are in use by all those LLMs deployed
> out there. The libraries are designed to be extendable and could be
> used by Emacs packages that, as of today, implement their own way to
> handle for example, server sent events in a streaming way.
>
> *plz-media-type:*
>
> This library builds upon the ~plz.el~ HTTP library and provides a
> mechanism to process responses based on their content type headers. It
> defines classes for parsing and processing the HTTP body of some
> standard MIME types like JSON, XML, HTML. It also contains classes
> that can handle formats like newline delimited JSON, or JSON arrays in
> a streaming way. Those last formats are often used by LLMs. The
> library is designed to be extendable (you can replace and bring your
> own media type class) and frees users from writing their own process
> filter functions.
>
> *plz-event-source:*
>
> This library provides a media type class, parser, and event source
> implementation for the Server-Sent Events (SSE) protocol. The media
> type class can be used with the ~plz-media-type~ library. We use it in
> the llm library to process HTTP responses for LLMs that return a MIME
> type of text/event-stream.
>
> I won't spend any significant time on re-designing the API (we went
> through many iterations) or making it compatible with url-retrieve
> right now, in case someone is suggesting this. This project was partly
> sponsored by my employer while I was on a 3 month working group and we
> want to use the llm library with curl. My time on this is reaching an
> end I would like to bring it over the finish line. I am committed to
> support Andrew should any bugs or significant issues come up.
>
> Andrew Hyatt asked me to write to you to get the green light for
> publishing those libraries to GNU ELPA, once we think they are
> stable. We plan to do this in about half a year.
>
> If you agree on eventually releasing those libraries to GNU ELPA, we
> plan to merge the "plz" branch of the llm library into master soon and
> release it to a wider audience. One package that would immediately
> benefit is Ellama [4] which I thoroughly tested while working on this.
>
> My employer and I already did the copyright assignment paperwork,
> which has been completed a month ago.
>
> Wdyt?
>
> Thanks, Roman.
>
> [1] https://github.com/r0man/plz-media-type
> [2] https://github.com/r0man/plz-event-source
> [3] https://github.com/ahyatt/llm/tree/plz
> [4] https://github.com/s-kostyaev/ellama
>

-- 
	Philip Kaludercic on peregrine



  reply	other threads:[~2024-04-27 13:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27  9:02 Add plz-media-type and plz-event-source to GNU ELPA when stabilized Roman Scherer
2024-04-27 13:43 ` Philip Kaludercic [this message]
2024-04-28 12:56   ` Roman Scherer
2024-04-29  6:09     ` Philip Kaludercic
2024-04-29  7:44       ` Roman Scherer
2024-04-29  7:46         ` Philip Kaludercic
2024-04-29  7:48           ` Roman Scherer
2024-04-29 18:24             ` Add plz-media-type and plz-event-source to GNU ELPA when stabilised Philip Kaludercic
2024-04-29 20:17               ` Roman Scherer
2024-05-01 11:25               ` Roman Scherer
2024-05-01 11:56                 ` Philip Kaludercic
2024-05-01 12:00                   ` Roman Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87frv6q5t5.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=ahyatt@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=roman.scherer@burningswell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).