An experiment to build a ChatGPT-like experience by using Deepchat
This does not work well. See this thread in Elixir Slack.
# Run this with: OPENAI_API_KEY= elixir bot.exs | |
Mix.install([ | |
{:tamnoon, "== 1.0.0-a.5"}, | |
{:langchain, "== 0.4.0-rc.0"} | |
]) | |
defmodule Bot.Components.Root do | |
@behaviour Tamnoon.Component |
# Run this as `elixir app.exs` | |
Mix.install([ | |
{:tamnoon, "~> 0.1.0"} | |
]) | |
defmodule TamnoonSample do | |
end | |
defmodule TamnoonSample.Router do |
Mix.install([ | |
{:ash, "~> 3.0"}, | |
{:phoenix_playground, "== 0.1.6"}, | |
], consolidate_protocols: false) | |
defmodule Helpdesk do | |
end | |
defmodule Helpdesk.Support do | |
use Ash.Domain, validate_config_inclusion?: false |
Mix.install([ | |
{:ash, "== 3.5.17"}, | |
{:ash_authentication, "== 4.9.0"}, | |
{:ash_authentication_phoenix, "== 2.8.0"}, | |
{:phoenix_playground, "== 0.1.6"}, | |
{:picosat_elixir, "== 0.2.3"}, | |
{:jason, "== 1.4.4"}, | |
{:bcrypt_elixir, "== 3.3.2"} | |
], consolidate_protocols: false) |
# postgres should be running | |
# it should have a table called todos | |
# See Migrations module on how to create the table | |
# The application can be started with | |
# JWT_SECRET=6fa91f11ca785e9a73d340ea8d3d03ed SECRET_KEY_BASE=6fa91f11ca785e9a73d340ea8d3d03ed6fa91f11ca785e9a73d340ea8d3d03ed elixir app.exs | |
# To access the app with authentication, visit this URL that includes the JWT token: | |
# http://localhost:4000/?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.keYoDT2sQMzTicz_1oqmfduw0HYrwnxc4iwoq9Vr-hQ | |
# Current issues: | |
# LiveView's second mount() does not include session data |
// ==UserScript== | |
// @name Create Google Calendar Event from Selected Text | |
// @namespace http://tampermonkey.net/ | |
// @version 1.1 | |
// @description Create a Google Calendar event using selected text and current page URL as the description | |
// @match *://*/* | |
// @grant GM_openInTab | |
// @grant GM_registerMenuCommand | |
// @grant GM_xmlhttpRequest | |
// ==/UserScript== |
# frozen_string_literal: true | |
# Run this app as: puma app.ru | |
# Most of this was taken from: https://greg.molnar.io/blog/a-single-file-rails-application/ | |
require 'bundler/inline' | |
gemfile(true) do | |
source 'https://rubygems.org' |
import svgwrite | |
def create_4player_chess_board(): | |
# Dimensions and colors | |
margin = 10 | |
square_size = 40 | |
board_size = 14 * square_size + 2*margin | |
light_color = '#ebecd0' | |
dark_color = '#739552' | |
light_extra_color = '#fdfee3' |
An experiment to build a ChatGPT-like experience by using Deepchat
This does not work well. See this thread in Elixir Slack.
FYI, we offer free managed hosting to Indian organizations (media, academia, institutions and non-profit/for-profit companies).
We're sharing our approach here to make it easy for those who want to do it themselves.