Summary

I am building an LSP server for Pen.el and I would like to intercept and provide a NL translation for LSP provisions, such as function signatures by the hover facility.

Prompt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
task: "Describe a Haskell function signature"
doc: "Given a Haskell function signature, describe it"
prompt-version: 1
prompt: |+
  Haskell type explanations:
  <delim>
  Signature: String -> Maybe [String]
  Description: This function takes a String and Maybe will return a list of Strings.
  <delim>
  Signature: String -> IO String
  Description: This function takes a String and performs some I/O before returning a String.
  <delim>
  Signature: <signature>
  Description:  
engine: "OpenAI Codex"
temperature: 0.2
max-generated-tokens: 100
top-p: 1.0
stop-sequences:
- "<delim>"
cache: on
vars:
- "signature"
examples:
- "FilePath -> [String] -> String -> IO String"
info: on
filter: off
completion: off
insertion: off

Example

signature

1
FilePath -> [String] -> String -> IO String

natural language

1
2
3
This function takes a FilePath, a list of
Strings and a String and performs some I/O
before returning a String.

Demo