DeFactOfficial commited on
Commit
f74084f
1 Parent(s): 979370a

Create skills.js

Browse files

The idea of skills API is to have endpoints that provide premade prompts explaining to models how our declarative APIs work and how to use them in different environments. These endpoints can be used as huggingchat URL based template variables that you just drop into the system prompt for any assistant.

Skills are like tools except compatible with every LLM that's smart enough to bother conversing with, and free from the token overhead involved with tool calls.

Right now only the image gen skill will work with huggingchat and most UIs, but it will be quite easy to add support for audio, video, and content sub regions if using an open source chat UI.

Files changed (1) hide show
  1. skills.js +18 -0
skills.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const createImages = (req, res) => {
2
+ const howto_markdown =`
3
+ //how to generate images inline with regular markdown output
4
+ //by using normal image tag with url and prompt.
5
+ //primary audience: LLM
6
+ `
7
+
8
+ const howto_html =`
9
+ //how to generate images inline with regular html img tag
10
+ //primary audience: human, LLM
11
+ `
12
+
13
+ const howto_json=`
14
+ //how to generate images by making an http post with the prompt and model
15
+ //returns json containing the url of the new image
16
+ //primary audience: developers
17
+ `
18
+ }