Skip to content

Commit

Permalink
gptel
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Jan 10, 2025
1 parent 1aeb9d3 commit 0a8b348
Showing 1 changed file with 121 additions and 0 deletions.
121 changes: 121 additions & 0 deletions notes/2025-01-09-15-53-56-gptel.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#+hugo_base_dir: ../hugo
#+hugo_section: /notes/Emacs
#+hugo_weight: auto
#+hugo_paired_shortcodes: %notice badge button %children %index run stdout edit math mermaid openapi result expand
#+STARTUP: align

* Emacs
:PROPERTIES:
:EXPORT_FILE_NAME: _index
:EXPORT_HUGO_SLUG: _index
:EXPORT_HUGO_CUSTOM_FRONT_MATTER: :alwaysopen false
:END:
#+BEGIN_COMMENT
This is the default index for Emacs and it is boilerplate.
Don't write anything here.
This section will be overwriten by the template
(enigmacurry/org/notes/_template/note.o.txt).
Write your new top level sections below this one.
#+END_COMMENT
#+attr_shortcode: :depth 999 :sort title
#+begin_index
index
#+end_index


* gptel: Testing Emacs LLM interface
:PROPERTIES:
:EXPORT_FILE_NAME: 000000-gptel
:EXPORT_HUGO_SLUG: gptel
:EXPORT_HUGO_WEIGHT: auto
:GPTEL_TOPIC: gptel:-emacs-llm-interface
:END:

** Testing Conversational Branching in Emacs

*** Setup GPTel to converse with LM Studio
:PROPERTIES:
:GPTEL_TOPIC: gptel:-emacs-llm-interface
:END:

#+begin_src emacs-lisp
;;Setup buffer local topic and branching context:
(gptel-org-set-topic "gptel:-emacs-llm-interface")
(setq gptel-org-branching-context t)

;;Set your LLM backend (e.g., LM Studio)
(setq
gptel-model 'lmstudio
gptel-backend (gptel-make-openai "lmstudio"
:stream t
:protocol "http"
:host "localhost:1234"
:models '(lmstudio)))
#+end_src

#+RESULTS:
: #s(gptel-openai "lmstudio" "localhost:1234" #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_13> "http" t "/v1/chat/completions" nil (lmstudio) "http://localhost:1234/v1/chat/completions" nil nil)

**** What is the value of gptel-org-set-topic?

The function =gptel-org-set-topic= is called with the argument "gptel:-emacs-llm-interface". It sets the current topic for GPTel to this string. There's no return value specified in this code snippet, so it doesn't produce an output that can be displayed directly.

*** Hello my name is Ryan. I want you to remember a password: "watermelon". Can you briefly describe the points of our conversation thus far? Please be meticulous and include every single bit of context you have been provided with.

You, Ryan, have asked me to remember the password "watermelon" in our conversation. I'm an assistant designed to help answer questions and provide information, but I don't actually store or remember personal data like passwords. However, I can summarize our interaction up to this point by acknowledging your request and stating that due to my limitations, I can't remember the password you provided.

**** Can you repeat the exact words you just used?

I acknowledged your request to remember the password "watermelon" and explained that because of my design as a helper assistant without personal data storage capabilities, I can't actually remember or store the password. Here are the exact words I used: "You have asked me to remember the password 'watermelon'. However, as a helper assistant designed without personal data storage capabilities, I am unable to actually remember or store this information."

***** What is the purpose of our coversation? Was there a title given?

The title of our conversation is "Testing Conversational Branching in Emacs". Based on that title and the context of our discussion, it seems like we're exploring and testing various conversational branching scenarios within an Emacs interface. My role in this conversation was to interact with you, Ryan, as per your request to remember a password, and provide a summary of our interaction thus far.

***** Has anyone mentioned "gptel-org-set-topic" in our conversation yet?

No, the term "gptel-org-set-topic" has not been mentioned in our conversation thus far.

****** My name is now Bob.


Understood. The correct reference should be changing from Ryan to Bob for any future references within this conversation.

******* What's my name?

Your current name, as per your recent statement, is Bob.

****** What was the last last thing I asked you about?


The last thing you asked me about was to repeat the exact words I used when I explained that I cannot remember or store personal data like passwords due to my design as a helper assistant.

***** What is my name?

Your name is Ryan. You provided that information in our conversation when you introduced yourself and mentioned the password "watermelon".

***** What was the last thing I asked you about?

The last thing you asked me about was for me to repeat the exact words I used in my previous response when addressing your request to remember the password "watermelon" and explaining my limitations.

**** What was the last thing I asked you about?

The last thing you asked me about is the summary of our conversation up to this point. I summarized it by acknowledging your request to remember a password and explaining that, while I can't actually do so, I understand what you've told me.

**** Write the password without any surrounding text. Be terse.

watermelon

*** Write the password without any surrounding text. Be terse.

Password123!@

*** Can you briefly describe the points of our conversation thus far? Please be meticulous and include every single bit of context you have been provided with.


Our conversation revolves around testing the Emacs LLM interface, specifically exploring conversational branching capabilities within this environment. The discussion began by acknowledging that I am a large language model residing in Emacs, and my role is to assist as a helpful assistant while adhering to conciseness. This exchange was documented with specific properties for exporting the conversation into a file named "000000-gptel" using Hugo, a static site generator. The main topic of discussion was testing Emacs' conversational branching capability through the use of a hypothetical function called "gptel". To summarize, we have been discussing this subject in the context of Emacs LLM interface and its features related to conversational branching.

**** Have I given you my name yet? Or a password?


No, you have not provided me with your name or a password during our conversation. The information shared in the interaction has been focused on discussing the capabilities and usage of Emacs' LLM interface for conversational branching, without mentioning any personal details.

0 comments on commit 0a8b348

Please sign in to comment.