James Bot - 404 🤖
8 |Sorry, this page doesn't exist.
9 | 12 |├── screenshot.png ├── config_example.py ├── schema.mysql.sql ├── schema.postgres.sql ├── templates ├── nav.html ├── 404.html ├── howitworks.html ├── prompt.html ├── login.html ├── admin.html ├── session.html ├── eval.html ├── head.html └── index.html ├── static └── manifest.json ├── requirements.txt ├── LICENSE ├── irc.pl ├── .gitignore ├── PromptManager.py ├── ingest.py ├── eval.py ├── generateprompt.py ├── README.md └── web.py /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aaronpk/llm-chatbot/main/screenshot.png -------------------------------------------------------------------------------- /config_example.py: -------------------------------------------------------------------------------- 1 | ME = "" 2 | CALLBACK_URL = "" 3 | CLIENT_ID = "" 4 | API_KEY = "" 5 | 6 | DB_TYPE = "mysql" 7 | # DB_TYPE = "postgres" 8 | # DB_TYPE = None 9 | DB_HOST = "" 10 | DB_NAME = "" 11 | DB_USER = "" 12 | DB_PASS = "" 13 | 14 | OPENAI_KEY = "" 15 | -------------------------------------------------------------------------------- /schema.mysql.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE answers ( 2 | id VARCHAR(255) NOT NULL PRIMARY KEY, 3 | date DATETIME, 4 | username VARCHAR(255), 5 | prompt TEXT, 6 | question TEXT, 7 | prompt_id VARCHAR(255), 8 | status VARCHAR(255), 9 | feedback INT(4) DEFAULT NULL 10 | ); 11 | 12 | -------------------------------------------------------------------------------- /schema.postgres.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE public.answers ( 3 | prompt text, 4 | question text, 5 | id text NOT NULL, 6 | prompt_id text, 7 | date text, 8 | username text, 9 | status text, 10 | feedback integer 11 | ); 12 | 13 | ALTER TABLE ONLY public.answers 14 | ADD CONSTRAINT answers_pkey PRIMARY KEY (id); 15 | 16 | -------------------------------------------------------------------------------- /templates/nav.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include 'head.html' %} 4 |
5 | {% include 'nav.html' %} 6 |Sorry, this page doesn't exist.
9 | 12 |James Bot is an AI chatbot built to reference James' writing. The bot can reference information, among other sources:
9 |The chatbot is powered by OpenAI's GPT-3.5 Turbo API.
15 |This bot is being built to reference sources when making statements to substantiate the results from the bot. With that said, the bot sometimes creates fake sources that are not in the reference corpus.
16 |This bot is prone to hallucination (generating text that is factually inaccurate).
17 |Claims made by the bot should be fact-checked against all provided sources, and with secondary sources should such research be prudent.
18 |This bot is an experiment with generative AI.
19 | 22 |Showing a saved answer.
9 | 10 |{{ prompt['prompt'] | safe }}
11 | {% if prompt['date'] %}
12 | Generated on {{ prompt['date'] }}.
13 | {% endif %} 14 |This text was written by a generative text language model that references James' writing. Factual inaccuracies may be present. Sources, where provided, should be validated by a human.
15 | 16 | 17 |James Bot is an AI chatbot trained on James' writing. You can ask the Bot questions below.
19 |Please note the Bot generates text and may be prone to hallucination (generating text that is factually inaccurate).
20 | 23 |Authenticated as {{ username }}
13 |Index Number: {{ index_number }}
14 |Queried Index: {{ queried_index }}
15 |Current Prompt ID: {{ prompt_id }}
16 |
18 | {{ current_prompt }}
19 |
20 | Downvoted
{% endif %} 26 |{{ prompt['prompt'] | safe }}
28 | {% if prompt['date'] %}
29 | Generated on {{ prompt['date'] }}
30 | {% endif %} 31 |(prompt ID {{ prompt['prompt_id'] }})
32 | {% if prompt['username'] %} 33 |Question asked by {{ prompt[5].replace("https://", "").replace("http://", "").strip("/") }}.
34 | {% endif %} 35 | 36 |{{ me }}
11 | {% endif %}
12 |
13 | This text was written by a generative text language model, trained on James' blog. Factual inaccuracies may be present.
17 |James Bot is an AI chatbot trained on James' public IRC messages and blog. You can ask the Bot questions below.
19 |Please note the Bot generates text and may be prone to hallucination (generating text that is factually inaccurate).
20 | 23 |{{ item["response"] | safe }}
32 | {{ item["response"] | safe }}
43 | {{ item["response"] | safe }}
54 | Ask a question!
11 |
12 | This text was written by a generative text language model, trained on James' blog. Factual inaccuracies may be present.
19 |James Bot is an AI chatbot trained on James' public IRC messages and blog. You can ask the Bot questions below.
52 |Please note the Bot generates text and may be prone to hallucination (generating text that is factually inaccurate).
53 | 56 |