backendjs/examples/prompts at master · vseryakov/backendjs · GitHub
//files/disambiguate" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
//files/disambiguate;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
vseryakov
backendjs
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star<br>41
FilesExpand file tree
master
/prompts<br>Copy path
Directory actions
More options<br>More options
Directory actions
More options<br>More options
Latest commit
History<br>History<br>History
master
/prompts<br>Copy path
Top
Folders and files<br>NameNameLast commit message<br>Last commit date<br>parent directory<br>..<br>modules
modules
web
web
README.md
README.md
bkjs.conf
bkjs.conf
package.json
package.json
screenshot.jpg
screenshot.jpg
screenshot1.jpg
screenshot1.jpg
screenshot2.jpg
screenshot2.jpg
View all files
README.md<br>Outline<br>Backendjs example showing how to compare output from different LLMs side by side
Summary
This is a demonstration of backendjs modules api, db, jobs, ws:
database tables to store models and results
API routes to handle requests, validation of input
a backgrouind job prompting all modesl at the same time and storing results as they come
calculate cosine similarity for every result against all other results, sort by most similar
notifying web clients via Websockets about progress and results
First Time Setup
This is an example inside the backendjs repository, so first you need to clone backendjs<br>it if it does not exist yet, skip to the next item if you have it
git clone --depth 1 https://github.com/vseryakov/backendjs.git
Navigate to the example:
cd backendjs/examples/prompts
3.. Prepare and start the example, no external dependencies are needed
npm run setup<br>npm run start
Visit http://localhost:8000
Tech Stack
Framework : Backendjs
Database : SQLite
Styling : Bootstrap 5
UI/UX : Alpinejs, Alpinejs-app
Project Structure
src/<br>├── web/<br>│ ├── propmts.js # Main component<br>│ ├── prompts.html # Main HTML template<br>| ├── models.html # Models popup<br>│ └── index.html # Home page<br>├── modules/<br>│ ├── llm.js # LLM access<br>│ ├── models.js # Models API<br>│ └── prompts.js # Prompts API<br>├── var/<br>└── prompt.db # Local SQLite database
Learn More
Backendjs Documentation
Alpinejs-app Documentation
Alpine.js Documentation
Boostrap Documentation
License
MIT
You can’t perform that action at this time.