├── .devcontainer ├── README.md ├── backend-dev │ ├── devcontainer.json │ └── post_create_command.sh ├── devcontainer.json ├── frontend-dev │ ├── devcontainer.json │ └── post_create_command.sh └── post_create_command.sh ├── .dockerignore ├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── build-frontend.yaml │ ├── build-postgres.yaml │ ├── deploy-docs-site.yaml │ ├── deploy-to-node.yaml │ ├── docker-build.yaml │ ├── pre-commit.yaml │ ├── production-deploy.yaml │ ├── production2-deploy.yaml │ ├── release.yaml │ ├── test-api-contract.yaml │ └── test-e2e.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── .python-version ├── .vscode ├── extensions.json ├── launch.json └── settings.json ├── CODEOWNERS ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── ansible ├── .gitignore ├── README.md ├── deploy-to-node.yaml ├── inference │ ├── deploy-server.yaml │ ├── deploy-worker.yaml │ ├── redis.conf │ └── test.inventory.ini ├── pgbackrest.conf ├── redis.conf └── test.inventory.ini ├── assets ├── logo.png ├── logo.svg ├── logo_crop.png ├── logo_mono.png ├── logo_mono.svg ├── open assistant hexagon sticker EN.png └── open assistant hexagon sticker EN.svg ├── backend ├── .env.example ├── .gitignore ├── README.md ├── alembic.ini ├── alembic │ ├── README │ ├── env.py │ ├── script.py.mako │ └── versions │ │ ├── 2022_12_15_0000-23e5fea252dd_first_revision.py │ │ ├── 2022_12_16_0000-cd7de470586e_v1_db_structure.py │ │ ├── 2022_12_17_2230-6368515778c5_add_auth_method_to_person.py │ │ ├── 2022_12_22_1835-0daec5f8135f_add_auth_method_to_ix_person_username.py │ │ ├── 2022_12_25_1705-067c4002f2d9_add_text_labels.py │ │ ├── 2022_12_27_1444-3358eb6834e6_add_journal_table.py │ │ ├── 2022_12_28_1142-d24b37426857_post_ref_for_work_package.py │ │ ├── 2022_12_28_1824-ef0b52902560_added_lang_column_for_iso_639_1_codes.py │ │ ├── 2022_12_29_2103-464ec4667aae_add_collective_flag_to_task.py │ │ ├── 2022_12_30_0109-73ce3675c1f5_add_field_trusted_api_client.py │ │ ├── 2022_12_30_2054-abb47e9d145a_name_changes_person_user_post_message_.py │ │ ├── 2022_12_31_0438-8d269bc4fdbd_add_deleted_field_to_post.py │ │ ├── 2023_01_05_1144-d4161e384f83_added_messagetreestate_table.py │ │ ├── 2023_01_05_1346-3b0adfadbef9_removed_date_created_and_deleted_flag_.py │ │ ├── 2023_01_05_1745-20cd871f4ec7_added_user_to_textlabels.py │ │ ├── 2023_01_07_1250-ba61fe17fb6e_added_frontend_type_to_api_client.py │ │ ├── 2023_01_08_1106-3d96bb92e33a_added_minilm_embedding_column_to_message.py │ │ ├── 2023_01_08_1603-35bdc1a08bb8_embedding_for_message_now_in_its_own_.py │ │ ├── 2023_01_08_2128-aac6b2f66006_created_date.py │ │ ├── 2023_01_08_2200-bcc2fe18d214_messagetoxicity.py │ │ ├── 2023_01_08_2208-92a367bb9f40_restructure_message_tree_state_table.py │ │ ├── 2023_01_09_0047-05975b274a81_add_review_count_ranking_count_to_.py │ │ ├── 2023_01_10_1733-846cc08ac79f_add_enabled_deleted_notes_fields_to_user.py │ │ ├── 2023_01_12_0119-befa42582ea4_remove_accepted_messages_from_message_.py │ │ ├── 2023_01_14_1509-619255ae9076_add_rank_to_message_table.py │ │ ├── 2023_01_15_0002-7c98102efbca_change_user_stats_ranking_counts.py │ │ ├── 2023_01_15_1139-423557e869e4_add_indices_for_created_date.py │ │ ├── 2023_01_15_1654-0964ac95170d_add_rank_and_indices_to_user_stats.py │ │ ├── 2023_01_19_2153-7f0a28a156f4_switch_to_timestamp_with_tz.py │ │ ├── 2023_01_19_2200-4f26fec4d204_add_ix_user_display_name_id.py │ │ ├── 2023_01_20_1650-160ac010efcc_use_en_instead_en_us_as_default_lang.py │ │ ├── 2023_01_24_1134-8ba17b5f467a_add_message_id_to_message_reaction.py │ │ ├── 2023_01_24_2256-40ed93df0ed5_add_message_emoji.py │ │ ├── 2023_01_26_1835-c84fcd6900dc_add_task_created_date_index.py │ │ ├── 2023_01_27_2013-f856bf19d32b_add_user_show_on_leaderboard.py │ │ ├── 2023_01_28_1157-49d8445b4c90_add_origin_column_to_message_tree_state.py │ │ ├── 2023_01_29_1207-7b8f0011e0b0_move_user_streak_from_user_stats_to_.py │ │ ├── 2023_02_01_0022-55361f323d12_add_tos_acceptance_date_to_user.py │ │ ├── 2023_02_01_1010-f60958968ff8_add_won_prompt_lottery_date_to_mts.py │ │ ├── 2023_02_01_2146-9e7ec4a9e3f2_add_skip_bool_skip_reason_to_task.py │ │ ├── 2023_02_02_1544-4d7e0b0ebe84_add_troll_stats.py │ │ ├── 2023_02_02_1817-8c8241d1f973_add_account_table.py │ │ ├── 2023_02_07_1922-caee1e8ee0bc_added_new_table_for_flagged_messages.py │ │ ├── 2023_02_11_1030-ba40d055714a_add_cached_stats.py │ │ ├── 2023_02_14_1756-165b55de5a94_add_text_labels_message_id_index.py │ │ ├── 2023_02_15_1754-8cd0c34d0c3c_message_review_result_nullable.py │ │ ├── 2023_02_26_0052-9db92d504f64_add_lang_to_message_tree_state.py │ │ ├── 2023_05_07_2129-1b6e3ae16e9d_add_text_search.py │ │ └── 2023_06_06_1505-c181661eba3a_add_message_revisions.py ├── export.py ├── import.py ├── main.py ├── oasst_backend │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ ├── deps.py │ │ └── v1 │ │ │ ├── __init__.py │ │ │ ├── admin.py │ │ │ ├── api.py │ │ │ ├── auth.py │ │ │ ├── frontend_messages.py │ │ │ ├── frontend_users.py │ │ │ ├── hugging_face.py │ │ │ ├── leaderboards.py │ │ │ ├── login.py │ │ │ ├── messages.py │ │ │ ├── stats.py │ │ │ ├── tasks.py │ │ │ ├── text_labels.py │ │ │ ├── trollboards.py │ │ │ ├── users.py │ │ │ └── utils.py │ ├── auth.py │ ├── cached_stats_repository.py │ ├── celery_worker.py │ ├── config.py │ ├── database.py │ ├── journal_writer.py │ ├── models │ │ ├── __init__.py │ │ ├── api_client.py │ │ ├── cached_stats.py │ │ ├── db_payload.py │ │ ├── flagged_message.py │ │ ├── journal.py │ │ ├── message.py │ │ ├── message_embedding.py │ │ ├── message_emoji.py │ │ ├── message_reaction.py │ │ ├── message_revision.py │ │ ├── message_toxicity.py │ │ ├── message_tree_state.py │ │ ├── payload_column_type.py │ │ ├── task.py │ │ ├── text_labels.py │ │ ├── troll_stats.py │ │ ├── user.py │ │ └── user_stats.py │ ├── prompt_repository.py │ ├── scheduled_tasks.py │ ├── schemas │ │ ├── __init__.py │ │ ├── hugging_face.py │ │ ├── message_tree.py │ │ └── text_labels.py │ ├── task_repository.py │ ├── tree_manager.py │ ├── user_repository.py │ ├── user_stats_repository.py │ └── utils │ │ ├── __init__.py │ │ ├── database_utils.py │ │ ├── discord.py │ │ ├── exported_tree_loading.py │ │ ├── hugging_face.py │ │ ├── language_classification.py │ │ ├── message_tree_topic_modeling.py │ │ ├── ranking.py │ │ ├── similarity_functions.py │ │ ├── topic_model_requirments.txt │ │ └── tree_export.py ├── requirements.txt ├── requirements_worker.txt ├── rerank.py ├── sql_snippets.md ├── test_data │ ├── generic │ │ └── test_generic_data.json │ └── realistic │ │ └── realistic_seed_data.json ├── tests │ ├── __init__.py │ ├── test_settings.py │ └── test_tree_manager_config.py └── update_message_attributes.py ├── copilot ├── .workspace ├── README.md ├── api │ └── manifest.yml ├── environments │ └── staging │ │ └── manifest.yml └── web │ └── manifest.yml ├── data ├── __init__.py ├── datasets │ ├── README.md │ ├── TSSB-3M │ │ ├── README.md │ │ ├── generate_dataset.py │ │ ├── invalid_commit_messages.tsv │ │ └── load_script.py │ ├── __init__.py │ ├── bart_searchgpt_wiki_nlp_augment │ │ ├── 1_clean_wikitext.py │ │ ├── 2_wikitext_doc2query.ipynb │ │ ├── 3_10k_bart_trial.ipynb │ │ ├── 3_10k_bart_trial.py │ │ ├── 4_convert_to_oa_format.py │ │ ├── 5_test_downloading_my_dataset.py │ │ ├── README.md │ │ ├── img │ │ │ ├── wiki_augment_bart.png │ │ │ └── wiki_augment_searchgpt.png │ │ └── requirement.txt │ ├── biostars_qa │ │ ├── README.md │ │ ├── get_biostars_dataset.py │ │ └── requirements.txt │ ├── cmu_wiki_qa │ │ ├── README.md │ │ ├── cmu_parser.ipynb │ │ └── requirements.txt │ ├── cocktail_recipes │ │ └── loading_script.py │ ├── codet_humaneval_mbpp │ │ ├── HumanEval_and_MBPP_code_gen.ipynb │ │ ├── HumanEval_and_MBPP_test_gen.ipynb │ │ └── README.md │ ├── fa-isna-news │ │ └── README.md │ ├── fa-wikipedia │ │ └── README.md │ ├── fd_dialogue │ │ └── README.md │ ├── grade_school_math_instructions │ │ └── dataset_creation.ipynb │ ├── gutenberg │ │ ├── README.md │ │ ├── project_gutenberg_crawler.ipynb │ │ └── requirements.txt │ ├── iapp_wiki_qa_squad │ │ ├── README.md │ │ ├── iapp_wiki_qa_squad_oa.ipynb │ │ ├── loading_script.py │ │ └── requirements.txt │ ├── instructional_codesearchnet_python │ │ ├── GenerateOpenAssistantInstructionResponseFormat.ipynb │ │ ├── README.md │ │ └── Summarize_codesearchnet_for_python.ipynb │ ├── logicreference_OA │ │ ├── README.md │ │ ├── generate_dataset.py │ │ └── requirements.txt │ ├── mt_note_generation │ │ ├── README.md │ │ ├── __init__.py │ │ ├── hub.py │ │ ├── mt_note_generation.py │ │ └── prepare.py │ ├── nsfw_selfharm_reddit │ │ ├── .gitignore │ │ ├── README.md │ │ ├── dataset-cookbook.ipynb │ │ ├── prosocial.ipynb │ │ └── utils │ │ │ ├── __init__.py │ │ │ ├── is_question.py │ │ │ └── reddit.py │ ├── oa_dolly_15k │ │ ├── README.md │ │ └── create_dataset.py │ ├── oa_leet10k │ │ ├── README.md │ │ └── oa_leet10k.ipynb │ ├── oa_stackexchange │ │ ├── README.md │ │ ├── combine.py │ │ ├── download.py │ │ ├── merge_parquets.py │ │ ├── process.py │ │ ├── stats.py │ │ └── upload.py │ ├── poetry_instruction │ │ ├── README.md │ │ ├── prepare.py │ │ └── requirements.txt │ ├── prosocial_confessions │ │ ├── README.md │ │ └── prosocial-confessions.ipynb │ ├── reasoning_bg_oa │ │ ├── README.MD │ │ └── data_process.py │ ├── reasoning_gsm_qna_oa │ │ ├── README.MD │ │ └── data_process.py │ ├── recipes │ │ ├── README.md │ │ └── tasty_recipes.ipynb │ ├── safety_directory │ │ ├── child_help │ │ │ └── child_help.py │ │ ├── emergency_infos │ │ │ ├── wikipedia_emergency_info.js │ │ │ └── wikipedia_emergency_info.json │ │ └── emergency_numbers │ │ │ └── emergency_numbers.py │ ├── semantics_ws_qna_oa │ │ ├── README.MD │ │ ├── data_process.py │ │ └── random_stuff.py │ ├── soda_synthetic_dialogue │ │ ├── README.md │ │ ├── __init__.py │ │ ├── hub.py │ │ ├── prepare.py │ │ └── soda_synthetic_dialogue.py │ ├── tatoeba_mt_qna_oa │ │ ├── README.MD │ │ ├── data_process.py │ │ ├── language_names.py │ │ ├── language_paraphrase.py │ │ └── language_translate.py │ ├── tell_a_joke │ │ └── tell_a_joke.ipynb │ ├── tlcv2.0_oa │ │ ├── README.md │ │ └── tlcv2_0_oa.ipynb │ ├── tv_dialogue │ │ ├── README.md │ │ ├── imsdb.ipynb │ │ ├── public.ipynb │ │ └── requirements.txt │ ├── ubuntu_dialogue_qa │ │ ├── README.md │ │ ├── requirements.txt │ │ └── ubuntu_parser.ipynb │ ├── youtube_subs_howto100M │ │ ├── __init__.py │ │ ├── hub.py │ │ ├── prepare.py │ │ ├── requirements.txt │ │ └── youtube_subs_howto100M.py │ └── zhihu-kol │ │ ├── .gitignore │ │ ├── README.md │ │ ├── __init__.py │ │ ├── convert_parquet.py │ │ ├── main.py │ │ ├── requirements.txt │ │ ├── scrape_by_topic.py │ │ └── upload_hf.py └── dev-requirements.txt ├── deploy ├── README.md ├── dev-node │ └── nginx │ │ ├── docker-compose.yaml │ │ ├── get_cert.sh │ │ ├── nginx.conf │ │ └── renew_certs.sh ├── prod-node │ └── nginx │ │ ├── docker-compose.yaml │ │ ├── get_cert.sh │ │ ├── nginx.conf │ │ └── renew_certs.sh └── prod2-node │ └── nginx │ ├── docker-compose.yaml │ ├── get_cert.sh │ ├── nginx.conf │ └── renew_certs.sh ├── discord-bots ├── oa-bot-js │ ├── .env.sample │ ├── .gitignore │ ├── README.md │ ├── docker-compose.yml │ ├── package.json │ ├── src │ │ ├── bot.ts │ │ ├── commands │ │ │ ├── bot.ts │ │ │ ├── chat.ts │ │ │ └── task.ts │ │ ├── events │ │ │ ├── commands.ts │ │ │ ├── interactions.ts │ │ │ ├── messages.ts │ │ │ └── ready.ts │ │ ├── handlers │ │ │ ├── commands.ts │ │ │ ├── events.ts │ │ │ └── interactions.ts │ │ ├── index.ts │ │ ├── interactions │ │ │ ├── model.ts │ │ │ ├── modelselect.ts │ │ │ ├── tasks.ts │ │ │ └── vote.ts │ │ └── modules │ │ │ ├── chat.ts │ │ │ ├── db.ts │ │ │ ├── inference │ │ │ ├── client.ts │ │ │ ├── index.ts │ │ │ └── types.ts │ │ │ ├── open-assistant │ │ │ ├── interactions.ts │ │ │ ├── interactions │ │ │ │ ├── info.ts │ │ │ │ ├── init.ts │ │ │ │ ├── label.ts │ │ │ │ ├── lang.ts │ │ │ │ └── task.ts │ │ │ ├── labels.ts │ │ │ ├── langs.ts │ │ │ ├── tasks.ts │ │ │ └── user.ts │ │ │ └── redis.ts │ └── tsconfig.json └── oa-bot-py │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── bot │ ├── __init__.py │ ├── __main__.py │ ├── bot.py │ ├── db │ │ ├── schema.sql │ │ └── schemas.py │ ├── extensions │ │ ├── __init__.py │ │ ├── guild_settings.py │ │ ├── help.py │ │ ├── hot_reload.py │ │ ├── text_labels.py │ │ ├── user_input_test.py │ │ └── work.py │ ├── messages.py │ ├── settings.py │ └── utils.py │ ├── message_templates.py │ ├── requirements.txt │ └── templates │ ├── boot.msg │ ├── help.msg │ ├── task_assistant_reply.msg │ ├── task_initial_prompt.msg │ ├── task_prompter_reply.msg │ ├── task_rank_conversation_replies.msg │ ├── task_rank_initial_prompts.msg │ ├── task_rate_summary.msg │ ├── task_summarize_story.msg │ ├── teaser_assistant_reply.msg │ ├── teaser_initial_prompt.msg │ ├── teaser_prompter_reply.msg │ ├── teaser_rank_conversation_replies.msg │ ├── teaser_rank_initial_prompts.msg │ ├── teaser_rate_summary.msg │ ├── teaser_summarize_story.msg │ └── welcome.msg ├── docker-compose.yaml ├── docker ├── Dockerfile.backend ├── Dockerfile.backend-worker ├── Dockerfile.discord-bot ├── Dockerfile.model-training ├── Dockerfile.website ├── grafana │ ├── README.md │ ├── dashboards │ │ ├── dashboard.yaml │ │ └── fastapi-backend.json │ └── datasources │ │ └── datasource.yml ├── inference │ ├── Dockerfile.safety │ ├── Dockerfile.server │ ├── Dockerfile.worker │ ├── Dockerfile.worker-full │ ├── Dockerfile.worker-hf │ └── Dockerfile.worker-standalone ├── netdata │ ├── README.md │ └── go.d │ │ ├── postgres.conf │ │ ├── prometheus.conf │ │ └── redis.conf ├── oasst-postgres │ ├── Dockerfile │ └── backup_pg_to_s3.sh └── prometheus │ ├── README.md │ └── prometheus.yml ├── docs ├── .gitignore ├── .yarnrc.yml ├── README.md ├── babel.config.js ├── blog │ ├── 2023-02-05-we-need-your-help.mdx │ ├── 2023-02-11-architecture.md │ ├── 2023-02-24-open-assistant-inference-backend-development-hands-on-coding │ │ └── index.mdx │ ├── 2023-04-06-open-assistant-first-models-are-here │ │ └── index.mdx │ ├── 2023-04-10-open-assistant-livestream-just-chatting │ │ └── index.mdx │ ├── 2023-04-15-open-assistant-released │ │ └── index.mdx │ ├── 2023-04-21-open-assistant-storms-youtube │ │ ├── img │ │ │ └── img.png │ │ └── index.md │ ├── 2023-10-25-open-assistant-is-completed │ │ └── index.mdx │ └── authors.yml ├── docs │ ├── api │ │ ├── backend-openapi.json │ │ └── inference-openapi.json │ ├── architecture │ │ ├── README.md │ │ └── inference.md │ ├── data │ │ ├── README.md │ │ ├── augmentation.md │ │ ├── datasets.md │ │ ├── img │ │ │ ├── db.png │ │ │ └── webdb.png │ │ ├── schemas.mdx │ │ └── supervised-datasets.md │ ├── faq.md │ ├── guides │ │ ├── README.md │ │ ├── data_collection.md │ │ ├── developers.md │ │ ├── examples.md │ │ └── guidelines.md │ ├── intro.md │ ├── plugins │ │ ├── README.md │ │ ├── details.md │ │ ├── getting-started.md │ │ ├── img │ │ │ ├── plugins-inspect.png │ │ │ └── plugins-quickstart.png │ │ └── list.md │ ├── presentations │ │ └── README.md │ ├── research │ │ ├── README.md │ │ ├── general.md │ │ ├── retrieval.md │ │ └── search-based-qa.md │ └── tasks │ │ ├── README.md │ │ ├── label_assistant_reply.md │ │ ├── label_prompter_reply.md │ │ ├── rank_assistant_replies.md │ │ ├── reply_as_assistant.md │ │ └── reply_as_user.md ├── docusaurus.config.js ├── package.json ├── sidebars.js ├── src │ ├── components │ │ └── HomepageFeatures │ │ │ ├── index.tsx │ │ │ └── styles.module.css │ ├── css │ │ └── custom.css │ └── pages │ │ ├── index.module.css │ │ └── index.tsx ├── static │ ├── .nojekyll │ └── img │ │ └── logo.svg └── yarn.lock ├── inference ├── .gitignore ├── README.md ├── full-dev-setup.sh ├── safety │ ├── README.md │ ├── main.py │ ├── requirements.txt │ ├── safety_main.sh │ └── settings.py ├── server │ ├── README.md │ ├── alembic.ini │ ├── alembic │ │ ├── README │ │ ├── env.py │ │ ├── script.py.mako │ │ └── versions │ │ │ ├── .gitinclude │ │ │ ├── 2023_03_12_1742-7d5be54acd49_initial_revision.py │ │ │ ├── 2023_03_21_2116-629d5081160f_changed_worker_config_to_worker_info.py │ │ │ ├── 2023_03_22_2113-78f16015b904_add_refresh_token_table.py │ │ │ ├── 2023_04_12_2033-f0e18084aae4_add_deleted_field_to_user.py │ │ │ ├── 2023_04_14_1611-b66fd8f9da1f_add_hidden_field_to_chats.py │ │ │ ├── 2023_04_24_2130-401eef162771_add_chat_data_opt_out_field.py │ │ │ ├── 2023_04_29_1739-ea19bbc743f9_add_safe_content_to_message.py │ │ │ ├── 2023_05_01_2253-5b4211625a9f_added_used_plugin_to_message.py │ │ │ └── 2023_05_29_1551-5ed411a331f4_add_active_thread_tail_messsage_id_and_.py │ ├── export.py │ ├── main.py │ ├── oasst_inference_server │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── auth.py │ │ ├── chat_repository.py │ │ ├── chat_utils.py │ │ ├── compliance.py │ │ ├── database.py │ │ ├── deps.py │ │ ├── models │ │ │ ├── __init__.py │ │ │ ├── chat.py │ │ │ ├── user.py │ │ │ └── worker.py │ │ ├── plugin_utils.py │ │ ├── plugins │ │ │ ├── __init__.py │ │ │ ├── gale_pleaser │ │ │ │ ├── README.md │ │ │ │ ├── ai-plugin.json │ │ │ │ ├── icon.png │ │ │ │ └── main.py │ │ │ ├── gale_roaster │ │ │ │ ├── ai-plugin.json │ │ │ │ └── main.py │ │ │ └── web_retriever │ │ │ │ ├── ai-plugin.json │ │ │ │ ├── icon.png │ │ │ │ └── main.py │ │ ├── queueing.py │ │ ├── routes │ │ │ ├── account.py │ │ │ ├── admin.py │ │ │ ├── auth.py │ │ │ ├── chats.py │ │ │ ├── configs.py │ │ │ └── workers.py │ │ ├── schemas │ │ │ ├── __init__.py │ │ │ ├── auth.py │ │ │ ├── chat.py │ │ │ └── worker.py │ │ ├── settings.py │ │ ├── user_chat_repository.py │ │ └── worker_utils.py │ ├── requirements.txt │ └── server_main.sh ├── tests │ └── locust │ │ └── locustfile.py ├── text-client │ ├── __main__.py │ ├── requirements.txt │ └── text_client_utils.py └── worker │ ├── README.md │ ├── __main__.py │ ├── basic_hf_server.py │ ├── chat_chain.py │ ├── chat_chain_prompts.py │ ├── chat_chain_utils.py │ ├── download_model.py │ ├── download_model_hf.py │ ├── get_model_config_prop.py │ ├── hf_langchain_inference.py │ ├── hf_stopping.py │ ├── hf_streamer.py │ ├── interface.py │ ├── openapi_parser.py │ ├── requirements-hf.txt │ ├── requirements.txt │ ├── run_worker_container.sh │ ├── settings.py │ ├── utils.py │ ├── work.py │ ├── worker_full_main.sh │ ├── worker_hf_main.sh │ └── worker_standalone_main.sh ├── inlang.config.js ├── model ├── .gitignore ├── MESSAGE_AND_TOKEN_FORMAT.md ├── README.md ├── model_eval │ ├── README.md │ ├── __init__.py │ ├── eval_datasets.py │ ├── eval_rm.py │ ├── manual │ │ ├── config │ │ │ ├── default.json │ │ │ ├── default_rallio.json │ │ │ ├── noprefix.json │ │ │ ├── noprefix2.json │ │ │ ├── noprefix2_profile.json │ │ │ ├── synth.json │ │ │ ├── synth2.json │ │ │ ├── synth2_gale_prefix.json │ │ │ ├── synth2_rallio_original.json │ │ │ ├── synth_rallio.json │ │ │ ├── system_profile.json │ │ │ └── system_profile2.json │ │ ├── create_synth_import.py │ │ ├── data │ │ │ ├── en_100_message.jsonl │ │ │ ├── en_100_text.jsonl │ │ │ ├── en_100_tree.jsonl │ │ │ └── prompt_lottery_en_250_text.jsonl │ │ ├── requirements.txt │ │ ├── sampling_report.py │ │ ├── sampling_reports │ │ │ ├── 2023-03-01_theblackcat102_pythia-12b-deduped-sft_sampling.json │ │ │ ├── 2023-03-01_theblackcat102_pythia-1b-deduped-sft_sampling.json │ │ │ └── 2023-03-01_theblackcat102_pythia-3b-deduped-sft_sampling.json │ │ └── subsample_dataset.py │ ├── rejection_sampling.py │ ├── sample_results │ │ ├── comparison.json │ │ ├── rejected_samples.json │ │ ├── selected_samples.json │ │ └── theblackcat102-pythia-12b-deduped-sft.json │ ├── sampling_score.py │ └── utils.py ├── model_training │ ├── .gitignore │ ├── README.md │ ├── __init__.py │ ├── check_dataset_appearances.py │ ├── check_dataset_counts.py │ ├── configs │ │ ├── accelerate_config.yaml │ │ ├── config.yaml │ │ ├── config_rl.yaml │ │ ├── config_rm.yaml │ │ ├── deepspeed_rl.json │ │ ├── deepspeed_rl_zero3.json │ │ ├── ppo_config.yaml │ │ ├── triton_config_rm.pbtxt │ │ ├── triton_config_sft.pbtxt │ │ ├── zero3_config_falcon.json │ │ ├── zero3_config_pretrain.json │ │ ├── zero3_config_sft.json │ │ ├── zero_config.json │ │ ├── zero_config_pretrain.json │ │ └── zero_config_sft_65b.json │ ├── custom_datasets │ │ ├── README.md │ │ ├── __init__.py │ │ ├── dialogue_collator.py │ │ ├── extra_rm_datasets.py │ │ ├── formatting.py │ │ ├── instruction.py │ │ ├── oasst_dataset.py │ │ ├── pretrain_datasets.py │ │ ├── prompt_dialogue.py │ │ ├── qa_datasets.py │ │ ├── rank_datasets.py │ │ ├── ranking_collator.py │ │ ├── summarization.py │ │ ├── toxic_conversation.py │ │ ├── translation.py │ │ └── utils.py │ ├── efficiency_utils.py │ ├── metrics.py │ ├── models │ │ ├── __init__.py │ │ ├── gptj.py │ │ ├── patching.py │ │ ├── patching_falcon.py │ │ ├── patching_llama.py │ │ ├── patching_neox.py │ │ ├── patching_utils.py │ │ ├── peft_modeling.py │ │ ├── prefix_llama.py │ │ ├── reward_model.py │ │ └── rope.py │ ├── tests │ │ ├── __init__.py │ │ ├── resources │ │ │ └── data_collator │ │ │ │ ├── special_tokens_map.json │ │ │ │ ├── tokenizer.json │ │ │ │ └── tokenizer_config.json │ │ ├── test_datasets.py │ │ ├── test_dialogue_data_collator.py │ │ ├── test_formatting.py │ │ ├── test_oasst_dataset.py │ │ ├── test_patched_falcon.py │ │ ├── test_patched_gpt_neox.py │ │ ├── test_patched_llama.py │ │ ├── test_ranking_collator.py │ │ ├── test_rm_loading.py │ │ └── test_utils.py │ ├── to_triton.py │ ├── tools │ │ ├── augment_oasst.py │ │ ├── check_oasst_export.py │ │ ├── export_model.py │ │ ├── model_chat.py │ │ ├── model_cli.py │ │ └── sample_rm_data.py │ ├── trainer_rl.py │ ├── trainer_rm.py │ ├── trainer_sft.py │ └── utils │ │ ├── losses.py │ │ ├── ppo_utils.py │ │ ├── utils.py │ │ └── utils_rl.py ├── pretokenizer │ ├── README.md │ ├── configs │ │ └── pretokenize.yaml │ ├── create_hf_tokenizer_config.py │ ├── indexed_dataset.py │ ├── pretokenize.py │ ├── requirements.txt │ └── tokenizer.py └── pyproject.toml ├── notebooks ├── README.md ├── TSSB-3M-bugs-dataset │ ├── TSSB-3M-bugs_dataset.ipynb │ └── TSSB-3M-bugs_dataset.md ├── closed-book-qa │ ├── Closed Book QA Generator.ipynb │ └── README.md ├── data-augmentation │ ├── README.md │ ├── anthropic │ │ ├── README.md │ │ ├── safety data-augmentation.ipynb │ │ └── trainer.py │ ├── changemyview-builder │ │ ├── README.md │ │ └── data_processor.ipynb │ ├── essay-instructions │ │ ├── README.md │ │ └── essay-instructions.ipynb │ ├── essay-revision │ │ ├── README.md │ │ └── essay-revision.ipynb │ ├── hippocorpus │ │ ├── README.md │ │ └── hippocorpus.ipynb │ ├── movie-descriptions │ │ ├── README.md │ │ └── movie_descriptions.ipynb │ ├── movie-dialogs │ │ ├── README.md │ │ └── convert-to-instruction-format.ipynb │ ├── stackexchange-builder │ │ ├── README.md │ │ └── stackexchange-builder.ipynb │ ├── unified-qa │ │ ├── README.md │ │ └── unified-qa.ipynb │ ├── wikidata-qa │ │ ├── README.md │ │ ├── requirements.txt │ │ └── wikidata.ipynb │ └── writing-prompt │ │ ├── .ipynb_checkpoints │ │ └── writing_prompt-checkpoint.ipynb │ │ ├── README.md │ │ └── writing_prompt.ipynb ├── detoxify-evaluation │ ├── README.md │ └── detoxify-evaluation.ipynb ├── diverse │ ├── README.md │ └── diverse.ipynb ├── example │ ├── README.md │ ├── data │ │ └── data.csv │ ├── example.ipynb │ └── requirements.txt ├── openassistant-oasst1 │ ├── README.md │ └── getting-started.ipynb └── openbugger │ ├── README.md │ └── openbugger_example.ipynb ├── oasst-data ├── README.md ├── examples │ ├── clean_dataset.py │ ├── filter_messages.py │ ├── filter_trees.py │ ├── split_dataset.py │ └── tree_to_messages.py ├── oasst_data │ ├── __init__.py │ ├── reader.py │ ├── schemas.py │ ├── traversal.py │ └── writer.py └── pyproject.toml ├── oasst-shared ├── README.md ├── oasst_shared │ ├── __init__.py │ ├── api_client.py │ ├── exceptions │ │ ├── __init__.py │ │ └── oasst_api_error.py │ ├── model_configs.py │ ├── schemas │ │ ├── __init__.py │ │ ├── inference.py │ │ └── protocol.py │ └── utils.py ├── pyproject.toml └── tests │ ├── __init__.py │ └── test_oasst_api_client.py ├── pyproject.toml ├── redis.conf ├── safety └── README.md ├── scripts ├── backend-development │ ├── README.md │ ├── run-local-no-limit.sh │ ├── run-local.sh │ ├── start-docker.sh │ ├── start-mock-server.sh │ ├── start-worker.sh │ ├── stop-mock-server.sh │ └── stop-worker.sh ├── data-collection │ └── twitter │ │ ├── README.md │ │ ├── requirements.txt │ │ ├── twitter_create_convs.py │ │ └── twitter_process_json.py ├── data_augment │ └── data_augment.py ├── discord │ ├── stats.py │ └── verify-lobby.py ├── frontend-development │ ├── README.md │ ├── find-missing-locales.py │ ├── run-bot-local.sh │ └── run-contract-test.sh ├── oasst-shared-development │ └── test.sh ├── postprocessing │ ├── importance_selection.py │ ├── infogain_selector.py │ ├── ranking_disagreement.py │ ├── rankings.py │ ├── regex_pii_detector.py │ ├── scoring.py │ └── task_schedule.py └── xor-codec │ └── xor_codec.py ├── text-frontend ├── __main__.py ├── auto_main.py └── requirements.txt └── website ├── .env ├── .eslintrc.json ├── .gitignore ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── .storybook ├── decorators.js ├── main.js └── preview.js ├── README.md ├── cypress-visual-screenshots └── baseline │ └── .gitkeep ├── cypress.config.contract.js ├── cypress.config.js ├── cypress ├── README.md ├── components │ └── Container.cy.tsx ├── contract │ └── oasst_api_contract_tests.cy.ts ├── e2e │ ├── auth │ │ └── signin.cy.ts │ └── tasks │ │ ├── label_assistant_reply.cy.ts │ │ ├── label_initial_prompt.cy.ts │ │ ├── label_prompter_reply.cy.ts │ │ ├── no_tasks_available.cy.ts │ │ └── random.cy.ts ├── fixtures │ └── example.json ├── support │ ├── commands.ts │ ├── component-index.html │ ├── component.ts │ ├── e2e.ts │ └── index.ts └── tsconfig.json ├── docs └── add_edit_translations.md ├── jest.config.js ├── jest.setup.js ├── next-i18next.config.js ├── next-lint.js ├── next.config.js ├── package-lock.json ├── package.json ├── postcss.config.js ├── prisma ├── migrations │ ├── 20230326131923_initial_migration │ │ └── migration.sql │ ├── 20230805220637_paperack │ │ └── migration.sql │ └── migration_lock.toml ├── schema.prisma └── seed.ts ├── public ├── fonts │ ├── lexend.txt │ └── lexend.woff2 ├── images │ ├── logos │ │ ├── favicon.png │ │ ├── logo.png │ │ ├── logo.svg │ │ ├── logo_192x192.png │ │ ├── logo_mono.png │ │ ├── logo_mono.svg │ │ └── redmond_logo.jpg │ └── temp-avatars │ │ ├── av1.jpg │ │ ├── av2.jpg │ │ ├── av3.jpg │ │ ├── av4.jpg │ │ └── av5.jpg ├── locales │ ├── ar │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── bar │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── bg │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ca │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── cs │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── da │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── de │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── el │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── en │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── eo │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── es │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── eu │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── fa │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── fi │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── fr │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── gl │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── he │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── hi │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── hu │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── id │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── it │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ja │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ko │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── lt │ │ ├── account.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ms │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── nb-NO │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── nl │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── pl │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── pt-BR │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ro │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── tasks.json │ │ └── tos.json │ ├── ru │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── sk │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── sl │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── sr │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── sv │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── swg │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── th │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── tr │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── uk-UA │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ ├── vi │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json │ └── zh │ │ ├── account.json │ │ ├── chat.json │ │ ├── common.json │ │ ├── dashboard.json │ │ ├── error.json │ │ ├── index.json │ │ ├── labelling.json │ │ ├── leaderboard.json │ │ ├── message.json │ │ ├── stats.json │ │ ├── tasks.json │ │ └── tos.json ├── manifest.json └── mockServiceWorker.js ├── src ├── README.md ├── components │ ├── Account │ │ ├── UserStats.tsx │ │ └── XPBar.tsx │ ├── AdminArea.tsx │ ├── AnimatedCircles │ │ ├── AnimatedCircles.tsx │ │ └── index.tsx │ ├── AuthLayout.tsx │ ├── Buttons │ │ ├── Buttons.stories.tsx │ │ ├── LikertButtons.tsx │ │ ├── Skip.tsx │ │ └── Submit.tsx │ ├── CallToAction.tsx │ ├── Chat │ │ ├── ChatAssistantDraftPager.tsx │ │ ├── ChatAssistantDraftViewer.tsx │ │ ├── ChatConfig.tsx │ │ ├── ChatConfigDesktop.tsx │ │ ├── ChatConfigForm.tsx │ │ ├── ChatConfigMobile.tsx │ │ ├── ChatConfigSaver.tsx │ │ ├── ChatConfigSummary.tsx │ │ ├── ChatContext.tsx │ │ ├── ChatConversation.tsx │ │ ├── ChatConversationTree.tsx │ │ ├── ChatForm.tsx │ │ ├── ChatInitialDataContext.tsx │ │ ├── ChatInputIconButton.tsx │ │ ├── ChatListBase.tsx │ │ ├── ChatListDesktop.tsx │ │ ├── ChatListItem.tsx │ │ ├── ChatListMobile.tsx │ │ ├── ChatMessageEntry.tsx │ │ ├── ChatSection.tsx │ │ ├── ChatViewSelection.tsx │ │ ├── ChatWarning.tsx │ │ ├── CreateChatButton.tsx │ │ ├── CustomInstructions.tsx │ │ ├── DeletePresetButton.tsx │ │ ├── EncourageMessage.tsx │ │ ├── InferencePoweredBy.tsx │ │ ├── PluginsChooser.tsx │ │ ├── QueueInfoMessage.tsx │ │ ├── SavePresetButton.tsx │ │ ├── WorkParameters.tsx │ │ └── useListChatPagination.ts │ ├── CloudflareCaptcha.tsx │ ├── CollapsableText.tsx │ ├── Container.tsx │ ├── Dashboard │ │ ├── LeaderboardWidget.tsx │ │ ├── SlimFooter.tsx │ │ ├── TaskOption.tsx │ │ ├── WelcomeCard.tsx │ │ └── index.ts │ ├── DataTable │ │ ├── DataTable.tsx │ │ ├── DataTableAction.tsx │ │ ├── jsonExpandRowModel.tsx │ │ └── useCursorPagination.ts │ ├── EmptyState.tsx │ ├── Explain.tsx │ ├── Faq.tsx │ ├── Footer.tsx │ ├── Header │ │ ├── ColorModeToggler.tsx │ │ ├── Header.stories.tsx │ │ ├── Header.tsx │ │ ├── UserMenu.stories.tsx │ │ ├── UserMenu.tsx │ │ ├── UserScore.tsx │ │ └── index.ts │ ├── Hero.tsx │ ├── JsonCard.tsx │ ├── LanguageSelector │ │ ├── LanguageSelector.tsx │ │ └── index.tsx │ ├── Layout.tsx │ ├── Layout │ │ └── ChatLayout.tsx │ ├── LeaderboardTable │ │ ├── LeaderboardTable.tsx │ │ ├── TrollboardTable.tsx │ │ ├── index.tsx │ │ ├── useBoardPagination.ts │ │ ├── useBoardRowProps.ts │ │ └── useFetchBoard.ts │ ├── Loading │ │ ├── Loading.stories.tsx │ │ ├── LoadingScreen.tsx │ │ └── MessageLoading.tsx │ ├── MarkdownEditor.tsx │ ├── Messages │ │ ├── AdminMessageTable.tsx │ │ ├── BaseMessageEntry.tsx │ │ ├── LabelFlagGroup.tsx │ │ ├── LabelInputGroup.tsx │ │ ├── LabelPopup.tsx │ │ ├── LabelYesNoGroup.tsx │ │ ├── MessageConversation.stories.tsx │ │ ├── MessageConversation.tsx │ │ ├── MessageCreateDate.tsx │ │ ├── MessageEmojiButton.stories.tsx │ │ ├── MessageEmojiButton.tsx │ │ ├── MessageHistoryTable.tsx │ │ ├── MessageInlineEmojiRow.tsx │ │ ├── MessageSyntheticBadge.tsx │ │ ├── MessageTableEntry.stories.tsx │ │ ├── MessageTableEntry.tsx │ │ ├── MessageTree.tsx │ │ ├── MessageWithChildren.stories.tsx │ │ ├── MessageWithChildren.tsx │ │ ├── PluginUsageDetails.tsx │ │ ├── RenderedCodeblock.tsx │ │ ├── RenderedMarkdown.tsx │ │ ├── ReportPopup.tsx │ │ └── SyntaxHighlighter.tsx │ ├── PolicyCards │ │ ├── PolicyChapterCard.tsx │ │ └── PolicySectionCard.tsx │ ├── Roadmap.tsx │ ├── RoleSelect.tsx │ ├── Services.tsx │ ├── SideMenu.tsx │ ├── SideMenuLayout.tsx │ ├── Sortable │ │ ├── Sortable.stories.tsx │ │ ├── Sortable.tsx │ │ └── SortableItem.tsx │ ├── Stats │ │ ├── Stats.components.tsx │ │ ├── Stats.stories.tsx │ │ ├── Stats.tsx │ │ └── index.ts │ ├── Survey │ │ ├── LabelLikertGroup.tsx │ │ ├── SurveyCard.tsx │ │ ├── TaskControls.tsx │ │ ├── TrackedTextarea.tsx │ │ └── TwoColumnsWithCards.tsx │ ├── TaskInfo │ │ └── TaskInfo.tsx │ ├── TaskPage │ │ └── TaskPage.tsx │ ├── Tasks │ │ ├── CreateTask.tsx │ │ ├── EvaluateTask.tsx │ │ ├── LabelTask │ │ │ ├── LabelTask.tsx │ │ │ └── index.tsx │ │ ├── Task │ │ │ ├── Task.stories.tsx │ │ │ ├── Task.tsx │ │ │ └── index.tsx │ │ ├── TaskHeader │ │ │ ├── TaskHeader.tsx │ │ │ └── index.tsx │ │ ├── TaskTypes.tsx │ │ └── UnchangedWarning.tsx │ ├── TeamMember.tsx │ ├── ToS.tsx │ ├── ToSWrapper.tsx │ ├── UserAvatar.tsx │ ├── UserDisplayNameCell.tsx │ ├── UserMessageConversation.tsx │ ├── UserTable.tsx │ ├── Vision.tsx │ └── icons │ │ ├── Markdown.tsx │ │ └── MarkdownOff.tsx ├── context │ └── TaskContext.ts ├── data │ └── team.json ├── flags.ts ├── hooks │ ├── auth │ │ ├── useHasAnyRole.ts │ │ └── useHasRole.ts │ ├── chat │ │ └── useMessageVote.ts │ ├── env │ │ └── BrowserEnv.ts │ ├── layout │ │ └── sidebarItems.ts │ ├── locale │ │ └── useCurrentLocale.ts │ ├── message │ │ ├── useDeleteMessage.ts │ │ └── useUndeleteMessage.ts │ ├── tasks │ │ ├── useCreateReply.ts │ │ ├── useEvaluateReplies.ts │ │ ├── useGenericTaskAPI.tsx │ │ └── useLabelingTask.ts │ └── ui │ │ ├── useFallbackRef.ts │ │ ├── useScrollToElementOnMount.ts │ │ └── useUserScore.ts ├── lib │ ├── api.ts │ ├── auth.ts │ ├── captcha.ts │ ├── chat_stream.test.ts │ ├── chat_stream.ts │ ├── constants.ts │ ├── defaultServerSideProps.ts │ ├── display_name_validation.ts │ ├── errors.ts │ ├── i18n.ts │ ├── isChatEnable.ts │ ├── iso6393.ts │ ├── languages.ts │ ├── leaderboard_utilities.ts │ ├── logger.ts │ ├── oasst_api_client.ts │ ├── oasst_client_factory.ts │ ├── oasst_inference_client.ts │ ├── prismadb.ts │ ├── routes.ts │ └── users.ts ├── logo.svg ├── middleware.ts ├── pages │ ├── 404.tsx │ ├── 500.tsx │ ├── _app.tsx │ ├── _document.tsx │ ├── about.tsx │ ├── account │ │ ├── delete.tsx │ │ ├── edit.tsx │ │ ├── index.tsx │ │ └── paperack.tsx │ ├── admin │ │ ├── edit │ │ │ └── [id].tsx │ │ ├── index.tsx │ │ ├── manage_user │ │ │ └── [id].tsx │ │ ├── messages │ │ │ ├── [id].tsx │ │ │ └── index.tsx │ │ ├── parameters.tsx │ │ ├── status │ │ │ └── index.tsx │ │ └── trollboard.tsx │ ├── api │ │ ├── account │ │ │ ├── delete.ts │ │ │ └── index.ts │ │ ├── admin │ │ │ ├── delete_message │ │ │ │ └── [id].ts │ │ │ ├── edit_message │ │ │ │ └── [id].tsx │ │ │ ├── messages │ │ │ │ ├── [id] │ │ │ │ │ ├── history.ts │ │ │ │ │ └── tree │ │ │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ │ ├── parameters.ts │ │ │ ├── set_tree_halted │ │ │ │ └── [id].ts │ │ │ ├── status.ts │ │ │ ├── trollboard.ts │ │ │ ├── undelete_message │ │ │ │ └── [id].ts │ │ │ ├── update_user.ts │ │ │ └── users.ts │ │ ├── auth │ │ │ └── [...nextauth].ts │ │ ├── available_tasks.ts │ │ ├── chat │ │ │ ├── assistant_message.ts │ │ │ ├── events.ts │ │ │ ├── index.ts │ │ │ ├── message.ts │ │ │ ├── message_eval.ts │ │ │ ├── models.ts │ │ │ ├── plugin_config.ts │ │ │ ├── plugins.ts │ │ │ ├── prompter_message.ts │ │ │ └── vote.ts │ │ ├── config.ts │ │ ├── leaderboard.ts │ │ ├── messages │ │ │ ├── [id] │ │ │ │ ├── children.ts │ │ │ │ ├── conversation.ts │ │ │ │ ├── emoji.ts │ │ │ │ ├── index.ts │ │ │ │ ├── parent.ts │ │ │ │ └── tree.ts │ │ │ ├── index.ts │ │ │ └── user.ts │ │ ├── new_task │ │ │ └── [task_type].ts │ │ ├── paperack.ts │ │ ├── reject_task.ts │ │ ├── report.ts │ │ ├── set_label.ts │ │ ├── stats │ │ │ └── cached_stats.ts │ │ ├── tos.ts │ │ ├── update_task.ts │ │ ├── user_stats.ts │ │ ├── username.ts │ │ └── valid_labels.ts │ ├── auth │ │ ├── signin.tsx │ │ └── verify.tsx │ ├── brb.tsx │ ├── bye.tsx │ ├── chat │ │ ├── [id].tsx │ │ └── index.tsx │ ├── contributors.tsx │ ├── create │ │ ├── assistant_reply.tsx │ │ ├── initial_prompt.tsx │ │ └── user_reply.tsx │ ├── dashboard.tsx │ ├── evaluate │ │ ├── rank_assistant_replies.tsx │ │ ├── rank_initial_prompts.tsx │ │ └── rank_user_replies.tsx │ ├── index.tsx │ ├── label │ │ ├── label_assistant_reply.tsx │ │ ├── label_initial_prompt.tsx │ │ └── label_prompter_reply.tsx │ ├── leaderboard.tsx │ ├── messages │ │ ├── [id] │ │ │ └── index.tsx │ │ └── index.tsx │ ├── privacy-policy.tsx │ ├── stats.tsx │ ├── tasks │ │ ├── all.tsx │ │ └── random.tsx │ ├── team.tsx │ └── terms-of-service.tsx ├── reportWebVitals.js ├── styles │ ├── Chakra.tsx │ ├── Theme │ │ ├── colors.ts │ │ ├── components │ │ │ ├── Badge.ts │ │ │ ├── Card.ts │ │ │ ├── Container.ts │ │ │ └── Table.ts │ │ └── index.ts │ └── globals.css ├── test-utils │ └── createMockRouter.ts ├── test_pages │ ├── README.md │ ├── about.test.tsx │ └── index.test.tsx ├── types │ ├── Account.ts │ ├── Chat.ts │ ├── Config.ts │ ├── Conversation.ts │ ├── Emoji.ts │ ├── Hooks.ts │ ├── Leaderboard.ts │ ├── Providers.ts │ ├── Stat.ts │ ├── Task.ts │ ├── TaskResponses.ts │ ├── Tasks.ts │ ├── Trollboard.ts │ └── Users.ts └── utils │ ├── buildTree.ts │ └── chat.ts ├── tailwind.config.js ├── tsconfig.json ├── types ├── env.d.ts ├── i18next.d.ts └── next-auth.d.ts └── wait-for-postgres.sh /.devcontainer/backend-dev/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Backend Development", 3 | "image": "mcr.microsoft.com/vscode/devcontainers/universal", 4 | "features": { 5 | "ghcr.io/devcontainers-contrib/features/pre-commit:2": { 6 | "version": "latest" 7 | } 8 | }, 9 | "postCreateCommand": "bash .devcontainer/backend-dev/post_create_command.sh", 10 | "postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder}", 11 | "customizations": { 12 | "vscode": { 13 | "extensions": [ 14 | "GitHub.copilot", 15 | "ms-python.python", 16 | "esbenp.prettier-vscode" 17 | ] 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Generic", 3 | "image": "mcr.microsoft.com/vscode/devcontainers/universal", 4 | "features": { 5 | "ghcr.io/devcontainers-contrib/features/pre-commit:2": { 6 | "version": "latest" 7 | } 8 | }, 9 | "postCreateCommand": ".devcontainer/post_create_command.sh", 10 | "customizations": { 11 | "vscode": { 12 | "extensions": [ 13 | "GitHub.copilot", 14 | "ms-python.python", 15 | "esbenp.prettier-vscode" 16 | ] 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.devcontainer/frontend-dev/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Front-end Development", 3 | "image": "mcr.microsoft.com/vscode/devcontainers/universal", 4 | "features": { 5 | "ghcr.io/devcontainers-contrib/features/pre-commit:2": { 6 | "version": "latest" 7 | } 8 | }, 9 | "postCreateCommand": ".devcontainer/frontend-dev/post_create_command.sh", 10 | "customizations": { 11 | "vscode": { 12 | "extensions": ["GitHub.copilot", "esbenp.prettier-vscode"] 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.devcontainer/frontend-dev/post_create_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # ensure pre-commit is installed 4 | pre-commit install 5 | 6 | # npm install in /website 7 | cd website 8 | npm install 9 | cd .. 10 | -------------------------------------------------------------------------------- /.devcontainer/post_create_command.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # do as little as possible in this script to keep the container creation fast. 4 | # for more specific devcontainer use cases use the different devcontainer subfolders. 5 | 6 | echo "done" 7 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | website/.next 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | *.ipynb linguist-documentation 3 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/website" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/build-frontend.yaml: -------------------------------------------------------------------------------- 1 | name: Build Frontend 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - website/** 9 | pull_request: 10 | paths: 11 | - website/** 12 | workflow_call: 13 | 14 | jobs: 15 | build-frontend: 16 | runs-on: ubuntu-latest 17 | defaults: 18 | run: 19 | working-directory: ./website 20 | steps: 21 | - uses: actions/checkout@v3 22 | - uses: actions/setup-node@v3 23 | with: 24 | node-version: 16.x 25 | cache: "npm" 26 | cache-dependency-path: website/package-lock.json 27 | - run: npm ci 28 | - run: npx prisma generate 29 | - run: npm run build 30 | -------------------------------------------------------------------------------- /.github/workflows/build-postgres.yaml: -------------------------------------------------------------------------------- 1 | name: Build OASST Postgres image 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | paths: 8 | - docker/oasst-postgres/** 9 | 10 | jobs: 11 | build-postgres: 12 | uses: ./.github/workflows/docker-build.yaml 13 | with: 14 | image-name: oasst-postgres 15 | context: ./docker/oasst-postgres 16 | dockerfile: docker/oasst-postgres/Dockerfile 17 | build-args: "" -------------------------------------------------------------------------------- /.github/workflows/production-deploy.yaml: -------------------------------------------------------------------------------- 1 | name: Deploy to prod 2 | 3 | on: 4 | push: 5 | branches: 6 | - production 7 | 8 | jobs: 9 | deploy-to-prod: 10 | uses: ./.github/workflows/deploy-to-node.yaml 11 | secrets: inherit 12 | with: 13 | stack-name: production 14 | image-tag: ${{ vars.PROD_IMAGE_TAG }} 15 | backend-port: 8280 16 | website-port: 3200 17 | inference-server-port: 8285 18 | -------------------------------------------------------------------------------- /.github/workflows/production2-deploy.yaml: -------------------------------------------------------------------------------- 1 | name: Deploy to prod2 2 | 3 | on: 4 | push: 5 | branches: 6 | - production2 7 | 8 | jobs: 9 | deploy-to-prod: 10 | uses: ./.github/workflows/deploy-to-node.yaml 11 | secrets: inherit 12 | with: 13 | stack-name: production2 14 | image-tag: ${{ vars.PROD_IMAGE_TAG }} 15 | backend-port: 8280 16 | website-port: 3200 17 | inference-server-port: 8285 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .venv* 2 | venv 3 | .env 4 | *.pyc 5 | *.swp 6 | *.egg-info 7 | __pycache__ 8 | .DS_Store 9 | 10 | # Generated files 11 | backend/oasst-openapi.json 12 | backend/openapi.json 13 | 14 | # ignore jupyter notebook checkpoints 15 | .ipynb_checkpoints 16 | 17 | *.log 18 | *.db 19 | 20 | # edit docs using obsidian.md, these files should not appear in the repo 21 | .obsidian/ 22 | .pytest_cache/ 23 | 24 | /docker-compose.override.yml 25 | 26 | # JetBrains PyCharm: 27 | .idea/ 28 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.10.8 2 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "ms-vscode-remote.remote-containers", 4 | "ms-vscode-remote.vscode-remote-extensionpack", 5 | "esbenp.prettier-vscode", 6 | "inlang.vs-code-extension" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.analysis.extraPaths": ["${workspaceFolder}/oasst-shared"], 3 | "prettier.singleQuote": false, 4 | "eslint.workingDirectories": ["./website", "./docs"], 5 | "python.testing.pytestArgs": ["backend/tests", "oasst-shared/tests"], 6 | "python.testing.unittestEnabled": false, 7 | "python.testing.pytestEnabled": true 8 | } 9 | -------------------------------------------------------------------------------- /ansible/.gitignore: -------------------------------------------------------------------------------- 1 | dev/ 2 | dev-inference/ 3 | *.local.yaml 4 | -------------------------------------------------------------------------------- /ansible/README.md: -------------------------------------------------------------------------------- 1 | To test the ansible playbook on localhost run 2 | `ansible-playbook -i test.inventory.ini dev.yaml`.\ 3 | In case you're missing the ansible docker dependency install it with `ansible-galaxy collection install community.docker`.\ 4 | Point Redis Insights to the Redis database by visiting localhost:8001 in a 5 | browser and select "I already have a database" followed by "Connect to a Redis 6 | Database".\ 7 | For host, port and name fill in `oasst-redis`, `6379` and `redis`. 8 | -------------------------------------------------------------------------------- /ansible/inference/redis.conf: -------------------------------------------------------------------------------- 1 | maxmemory 1024mb 2 | maxmemory-policy allkeys-lru 3 | -------------------------------------------------------------------------------- /ansible/inference/test.inventory.ini: -------------------------------------------------------------------------------- 1 | [test] 2 | dev ansible_connection=local 3 | -------------------------------------------------------------------------------- /ansible/pgbackrest.conf: -------------------------------------------------------------------------------- 1 | [oasst] 2 | pg1-path=/var/lib/postgresql/data 3 | 4 | [global] 5 | repo1-retention-full=3 6 | repo1-type=s3 7 | repo1-path=/oasst-prod 8 | repo1-s3-region=us-east-1 9 | repo1-s3-endpoint=s3.amazonaws.com 10 | # repo1-s3-bucket=$S3_BUCKET_NAME 11 | # repo1-s3-key=$AWS_ACCESS_KEY 12 | # repo1-s3-key-secret=$AWS_SECRET_KEY 13 | 14 | # Force a checkpoint to start backup immediately. 15 | start-fast=y 16 | # Use delta restore. 17 | delta=y 18 | 19 | # Enable ZSTD compression. 20 | compress-type=zst 21 | compress-level=6 22 | 23 | log-level-console=info 24 | log-level-file=debug 25 | -------------------------------------------------------------------------------- /ansible/redis.conf: -------------------------------------------------------------------------------- 1 | maxmemory 100mb 2 | maxmemory-policy allkeys-lru 3 | -------------------------------------------------------------------------------- /ansible/test.inventory.ini: -------------------------------------------------------------------------------- 1 | [test] 2 | dev ansible_connection=local 3 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/assets/logo.png -------------------------------------------------------------------------------- /assets/logo_crop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/assets/logo_crop.png -------------------------------------------------------------------------------- /assets/logo_mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/assets/logo_mono.png -------------------------------------------------------------------------------- /assets/open assistant hexagon sticker EN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/assets/open assistant hexagon sticker EN.png -------------------------------------------------------------------------------- /backend/.env.example: -------------------------------------------------------------------------------- 1 | HUGGING_FACE_API_KEY=HF API KEY 2 | DATABASE_URI="postgresql://:@/" 3 | BACKEND_CORS_ORIGINS=["http://localhost", "http://localhost:4200", "http://localhost:3000", "http://localhost:8080", "https://localhost", "https://localhost:4200", "https://localhost:3000", "https://localhost:8080", "http://dev.oasst.laion.ai", "https://stag.oasst.laion.ai", "https://oasst.laion.ai"] 4 | REDIS_HOST=localhost 5 | REDIS_PORT=6379 6 | 7 | 8 | export DEBUG_SKIP_EMBEDDING_COMPUTATION=False 9 | export DEBUG_SKIP_TOXICITY_CALCULATION=False 10 | -------------------------------------------------------------------------------- /backend/.gitignore: -------------------------------------------------------------------------------- 1 | __pycache__ 2 | .env 3 | notes.txt 4 | venv 5 | celerybeat-schedule.* 6 | -------------------------------------------------------------------------------- /backend/alembic/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. 2 | -------------------------------------------------------------------------------- /backend/alembic/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | import sqlmodel 11 | ${imports if imports else ""} 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = ${repr(up_revision)} 15 | down_revision = ${repr(down_revision)} 16 | branch_labels = ${repr(branch_labels)} 17 | depends_on = ${repr(depends_on)} 18 | 19 | 20 | def upgrade() -> None: 21 | ${upgrades if upgrades else "pass"} 22 | 23 | 24 | def downgrade() -> None: 25 | ${downgrades if downgrades else "pass"} 26 | -------------------------------------------------------------------------------- /backend/alembic/versions/2023_01_07_1250-ba61fe17fb6e_added_frontend_type_to_api_client.py: -------------------------------------------------------------------------------- 1 | """added frontend_type to api_client 2 | 3 | Revision ID: ba61fe17fb6e 4 | Revises: 20cd871f4ec7 5 | Create Date: 2023-01-07 12:50:32.195930 6 | 7 | """ 8 | import sqlalchemy as sa 9 | from alembic import op 10 | 11 | # revision identifiers, used by Alembic. 12 | revision = "ba61fe17fb6e" 13 | down_revision = "20cd871f4ec7" 14 | branch_labels = None 15 | depends_on = None 16 | 17 | 18 | def upgrade() -> None: 19 | op.add_column("api_client", sa.Column("frontend_type", sa.String(256), nullable=True)) 20 | 21 | 22 | def downgrade() -> None: 23 | op.drop_column("api_client", "frontend_type") 24 | -------------------------------------------------------------------------------- /backend/oasst_backend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/oasst_backend/__init__.py -------------------------------------------------------------------------------- /backend/oasst_backend/api/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/oasst_backend/api/__init__.py -------------------------------------------------------------------------------- /backend/oasst_backend/api/v1/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/oasst_backend/api/v1/__init__.py -------------------------------------------------------------------------------- /backend/oasst_backend/database.py: -------------------------------------------------------------------------------- 1 | from oasst_backend.config import settings 2 | from oasst_shared.exceptions import OasstError, OasstErrorCode 3 | from sqlmodel import create_engine 4 | 5 | if settings.DATABASE_URI is None: 6 | raise OasstError("DATABASE_URI is not set", error_code=OasstErrorCode.DATABASE_URI_NOT_SET) 7 | 8 | engine = create_engine( 9 | settings.DATABASE_URI, 10 | echo=settings.DEBUG_DATABASE_ECHO, 11 | isolation_level="REPEATABLE READ", 12 | pool_size=settings.DATABASE_POOL_SIZE, 13 | max_overflow=settings.DATABASE_MAX_OVERFLOW, 14 | ) 15 | -------------------------------------------------------------------------------- /backend/oasst_backend/models/cached_stats.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | 3 | import sqlalchemy as sa 4 | import sqlalchemy.dialects.postgresql as pg 5 | from sqlmodel import AutoString, Field, SQLModel 6 | 7 | 8 | class CachedStats(SQLModel, table=True): 9 | __tablename__ = "cached_stats" 10 | 11 | name: str = Field(sa_column=sa.Column(AutoString(length=128), primary_key=True)) 12 | 13 | modified_date: datetime | None = Field( 14 | sa_column=sa.Column(sa.DateTime(timezone=True), nullable=False, server_default=sa.func.current_timestamp()) 15 | ) 16 | 17 | stats: dict | list | None = Field(None, sa_column=sa.Column(pg.JSONB, nullable=False)) 18 | -------------------------------------------------------------------------------- /backend/oasst_backend/schemas/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/oasst_backend/schemas/__init__.py -------------------------------------------------------------------------------- /backend/oasst_backend/schemas/hugging_face.py: -------------------------------------------------------------------------------- 1 | from pydantic import BaseModel 2 | 3 | 4 | class ToxicityClassification(BaseModel): 5 | label: str 6 | score: float 7 | -------------------------------------------------------------------------------- /backend/oasst_backend/schemas/message_tree.py: -------------------------------------------------------------------------------- 1 | from uuid import UUID 2 | 3 | from oasst_backend.models.message_tree_state import State as TreeState 4 | from pydantic import BaseModel 5 | 6 | 7 | class MessageTreeStateResponse(BaseModel): 8 | message_tree_id: UUID 9 | state: TreeState 10 | goal_tree_size: int 11 | max_depth: int 12 | max_children_count: int 13 | active: bool 14 | origin: str | None 15 | -------------------------------------------------------------------------------- /backend/oasst_backend/schemas/text_labels.py: -------------------------------------------------------------------------------- 1 | from oasst_shared.schemas.protocol import LabelDescription 2 | from pydantic import BaseModel 3 | 4 | 5 | class ValidLabelsResponse(BaseModel): 6 | valid_labels: list[LabelDescription] 7 | -------------------------------------------------------------------------------- /backend/oasst_backend/utils/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/oasst_backend/utils/__init__.py -------------------------------------------------------------------------------- /backend/oasst_backend/utils/topic_model_requirments.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | sentence-transformers 3 | bertopic 4 | scipy 5 | -------------------------------------------------------------------------------- /backend/requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp==3.8.3 2 | alembic==1.8.1 3 | asgiref==3.6.0 4 | Celery==5.2.0 5 | cryptography==41.0.0 6 | fastapi==0.88.0 7 | fastapi-limiter==0.1.5 8 | fastapi-utils==0.2.1 9 | loguru==0.6.0 10 | numpy>=1.23.2 11 | prometheus-fastapi-instrumentator==5.9.1 12 | psycopg2-binary==2.9.5 13 | pydantic==1.10.7 14 | pydantic[email]==1.10.7 15 | python-dotenv==0.21.0 16 | python-jose[cryptography]==3.3.0 17 | redis==4.5.5 18 | requests==2.31.0 19 | scipy==1.8.1 20 | SQLAlchemy==1.4.41 21 | sqlmodel==0.0.8 22 | tqdm>=4.64.1 23 | uuid7==0.1.0 24 | uvicorn==0.20.0 25 | -------------------------------------------------------------------------------- /backend/requirements_worker.txt: -------------------------------------------------------------------------------- 1 | aiohttp==3.8.3 2 | alembic==1.8.1 3 | asgiref==3.6.0 4 | Celery==5.2.0 5 | cryptography==39.0.0 6 | fastapi==0.88.0 7 | fastapi-limiter==0.1.5 8 | fastapi-utils==0.2.1 9 | loguru==0.6.0 10 | numpy>=1.22.4 11 | psycopg2==2.9.3 12 | pydantic==1.9.1 13 | pydantic[email]==1.9.1 14 | python-dotenv==0.21.0 15 | python-jose[cryptography]==3.3.0 16 | redis==4.5.5 17 | requests==2.30.0 18 | scipy==1.8.1 19 | SQLAlchemy==1.4.41 20 | sqlmodel==0.0.8 21 | starlette==0.22.0 22 | uuid7==0.1.0 23 | uvicorn==0.20.0 24 | -------------------------------------------------------------------------------- /backend/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/backend/tests/__init__.py -------------------------------------------------------------------------------- /backend/tests/test_tree_manager_config.py: -------------------------------------------------------------------------------- 1 | from oasst_backend.config import TreeManagerConfiguration 2 | 3 | 4 | def test_tree_manager_config(): 5 | """ 6 | Just test that we can create a config 7 | """ 8 | TreeManagerConfiguration() 9 | -------------------------------------------------------------------------------- /copilot/.workspace: -------------------------------------------------------------------------------- 1 | application: open-assistant 2 | -------------------------------------------------------------------------------- /copilot/environments/staging/manifest.yml: -------------------------------------------------------------------------------- 1 | # The manifest for the "staging" environment. 2 | # Read the full specification for the "Environment" type at: 3 | # https://aws.github.io/copilot-cli/docs/manifest/environment/ 4 | 5 | name: staging 6 | type: Environment 7 | 8 | # Configure observability for your environment resources. 9 | observability: 10 | container_insights: false 11 | -------------------------------------------------------------------------------- /data/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/__init__.py -------------------------------------------------------------------------------- /data/datasets/TSSB-3M/README.md: -------------------------------------------------------------------------------- 1 | # Dataset summary 2 | 3 | This dataset contains over 3 million isolated single statement bug fixes. Each 4 | bug fix is related to a commit in a public Python that does not change more than 5 | a single statement 6 | 7 | 1. The original dataset comes from the 8 | [TSSB-3M](https://zenodo.org/record/5845439) dataset 9 | 2. By requesting the GitHub api to obtain the commit message, we expand and 10 | create a new dataset 11 | [TSSB-3M-ext](https://huggingface.co/datasets/zirui3/TSSB-3M-ext) 12 | 3. Convert `TSSB-3M-ext` into instruction form to form the 13 | [TSSB-3M-instruction](https://huggingface.co/datasets/zirui3/TSSB-3M-instructions) 14 | dataset 15 | -------------------------------------------------------------------------------- /data/datasets/TSSB-3M/load_script.py: -------------------------------------------------------------------------------- 1 | from datasets import load_dataset 2 | 3 | if __name__ == "__main__": 4 | ds = load_dataset("zirui3/TSSB-3M-instructions") 5 | print(ds) 6 | -------------------------------------------------------------------------------- /data/datasets/bart_searchgpt_wiki_nlp_augment/5_test_downloading_my_dataset.py: -------------------------------------------------------------------------------- 1 | if __name__ == "__main__": 2 | from datasets import load_dataset 3 | 4 | dataset = load_dataset("michaelthwan/oa_wiki_qa_bart_10000row", split="train") 5 | print(dataset[0]) 6 | -------------------------------------------------------------------------------- /data/datasets/bart_searchgpt_wiki_nlp_augment/img/wiki_augment_bart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/bart_searchgpt_wiki_nlp_augment/img/wiki_augment_bart.png -------------------------------------------------------------------------------- /data/datasets/bart_searchgpt_wiki_nlp_augment/img/wiki_augment_searchgpt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/bart_searchgpt_wiki_nlp_augment/img/wiki_augment_searchgpt.png -------------------------------------------------------------------------------- /data/datasets/bart_searchgpt_wiki_nlp_augment/requirement.txt: -------------------------------------------------------------------------------- 1 | ## python 3.10.8 2 | # basic 3 | pandas==1.5.3 4 | # PyYAML==6.0 5 | 6 | # embedding 7 | matplotlib==3.7.1 8 | seaborn 9 | 10 | # misc 11 | psutil==5.9.4 12 | 13 | # huggingface 14 | datasets 15 | transformers 16 | -------------------------------------------------------------------------------- /data/datasets/biostars_qa/requirements.txt: -------------------------------------------------------------------------------- 1 | pandas 2 | pyarrow 3 | requests 4 | tdqm 5 | -------------------------------------------------------------------------------- /data/datasets/cmu_wiki_qa/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | pandas 3 | pyarrow 4 | requests 5 | tqdm 6 | -------------------------------------------------------------------------------- /data/datasets/cocktail_recipes/loading_script.py: -------------------------------------------------------------------------------- 1 | from datasets import load_dataset 2 | 3 | if __name__ == "__main__": 4 | ds = load_dataset("brianarbuckle/cocktail_recipes") 5 | print(ds["train"]) 6 | -------------------------------------------------------------------------------- /data/datasets/fa-isna-news/README.md: -------------------------------------------------------------------------------- 1 | This text-only dataset is crawled from [Isna news](https://isna.ir/). This is 2 | biggest farsi news agency and thus the text is pretty clean. 3 | -------------------------------------------------------------------------------- /data/datasets/fa-wikipedia/README.md: -------------------------------------------------------------------------------- 1 | This dataset is crawled from 2 | [farsi wikipedia](https://fa.wikipedia.org/wiki/%D8%B5%D9%81%D8%AD%D9%87%D9%94_%D8%A7%D8%B5%D9%84%DB%8C). 3 | This is valuable clean text data in persian (Farsi). It contains information 4 | about all subjects. 5 | 6 | It has 2.53M Articles. 7 | -------------------------------------------------------------------------------- /data/datasets/gutenberg/requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4 2 | numpy 3 | pandas 4 | pyarrow 5 | requests 6 | tqdm 7 | -------------------------------------------------------------------------------- /data/datasets/iapp_wiki_qa_squad/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | license: mit 3 | language: 4 | - th 5 | tags: 6 | - Open Assistant 7 | task_categories: 8 | - question-answering 9 | - text-generation 10 | --- 11 | 12 | This dataset is fork from 13 | [https://huggingface.co/datasets/iapp_wiki_qa_squad](https://huggingface.co/datasets/iapp_wiki_qa_squad) 14 | that made for Open Assistant. 15 | 16 | Pull request: 17 | [Add iapp_wiki_qa_squad to datasets #1903 ](https://github.com/LAION-AI/Open-Assistant/pull/1903) 18 | -------------------------------------------------------------------------------- /data/datasets/iapp_wiki_qa_squad/loading_script.py: -------------------------------------------------------------------------------- 1 | from datasets import load_dataset 2 | 3 | if __name__ == "__main__": 4 | ds = load_dataset("wannaphong/iapp_wiki_qa_squad_oa") 5 | print(ds) 6 | -------------------------------------------------------------------------------- /data/datasets/iapp_wiki_qa_squad/requirements.txt: -------------------------------------------------------------------------------- 1 | datasets 2 | numpy 3 | pandas 4 | pyarrow 5 | -------------------------------------------------------------------------------- /data/datasets/logicreference_OA/requirements.txt: -------------------------------------------------------------------------------- 1 | absl_py>=0.13.0 2 | tensorflow>=2.6.0 3 | -------------------------------------------------------------------------------- /data/datasets/mt_note_generation/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/mt_note_generation/__init__.py -------------------------------------------------------------------------------- /data/datasets/mt_note_generation/hub.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | import datasets 4 | 5 | 6 | @dataclass 7 | class OpenAssistantConfig(datasets.BuilderConfig): 8 | """BuilderConfig for OpenAssistant datasets.""" 9 | 10 | name: str = None 11 | version: datasets.Version = None 12 | description: str = None 13 | schema: str = None 14 | subset_id: str = None 15 | 16 | 17 | features = datasets.Features( 18 | { 19 | "conversation": datasets.Value("string"), 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /data/datasets/nsfw_selfharm_reddit/.gitignore: -------------------------------------------------------------------------------- 1 | dataframes/*.csv 2 | comments_cache/*.csv 3 | *.csv 4 | -------------------------------------------------------------------------------- /data/datasets/nsfw_selfharm_reddit/README.md: -------------------------------------------------------------------------------- 1 | # NSFW - CSAM from Reddit 2 | 3 | Note(TODO): this is the pipeline, will need to scale this dataset by getting 4 | data from file.pushshift.io The scripts and notebooks in the directory are used 5 | to create the NSFW and CSAM dataset from Reddit that can be used to train the 6 | safety model. 7 | -------------------------------------------------------------------------------- /data/datasets/nsfw_selfharm_reddit/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from datasets import load_dataset 2 | 3 | from .is_question import is_question 4 | from .reddit import init_praw_reddit, scrap_subreddit 5 | 6 | __all__ = ["is_question", "scrap_subreddit", "init_praw_reddit"] 7 | 8 | 9 | def save_to_huggingface(df, name): 10 | TMP_FILE = "/tmp/save_to_huggingface_tmp.json" 11 | df.to_json(TMP_FILE, orient="records") 12 | hf_dataset = load_dataset("json", data_files=TMP_FILE) 13 | hf_dataset.push_to_hub(name) 14 | -------------------------------------------------------------------------------- /data/datasets/oa_dolly_15k/README.md: -------------------------------------------------------------------------------- 1 | See the [Dolly repo](https://github.com/databrickslabs/dolly/tree/master/data) 2 | for information on this dataset. 3 | -------------------------------------------------------------------------------- /data/datasets/oa_leet10k/README.md: -------------------------------------------------------------------------------- 1 | # oa_leet10k datasets 2 | 3 | Here we convert oa_leet10k dataset to be uploaded to huggingface. 4 | 5 | ## oa_leet10k.ipynb 6 | 7 | Takes this Kaggle dataset 'leetcode-solutions' 8 | https://www.kaggle.com/datasets/erichartford/leetcode-solutions, and turns them 9 | into basic dialogue using a preset list of user prompt templates. 10 | 11 | ### Some ideas for extending this dataset 12 | 13 | The solutions need to be verified. 14 | -------------------------------------------------------------------------------- /data/datasets/oa_stackexchange/stats.py: -------------------------------------------------------------------------------- 1 | import glob 2 | import re 3 | 4 | from pyarrow.parquet import ParquetDataset 5 | 6 | 7 | def rows(topic): 8 | dataset = ParquetDataset(f"parquet/{topic}.parquet") 9 | return sum(p.count_rows() for p in dataset.fragments) 10 | 11 | 12 | for f in sorted(glob.glob("parquet/*.parquet")): 13 | topic = re.match(r".*\/(.*?)\.parquet", f)[1] 14 | num = rows(topic) 15 | print(f"- {topic}: {int(num):,}") 16 | -------------------------------------------------------------------------------- /data/datasets/poetry_instruction/requirements.txt: -------------------------------------------------------------------------------- 1 | kaggle==1.5.13 2 | pandas==2.0.0 3 | -------------------------------------------------------------------------------- /data/datasets/reasoning_bg_oa/README.MD: -------------------------------------------------------------------------------- 1 | # Dataset Card for Bulgarian QnA reasoning with ~2.7K entries. 2 | 3 | ### Dataset Summary 4 | 5 | - License: apache-2.0 6 | - Contains Parquet of a list of instructions and answers in Bulgarian language. 7 | 8 | Each row consists of 9 | 10 | - INSTRUCTION 11 | - RESPONSE 12 | - SOURCE (reasoning_bg) 13 | - METADATA (json with language, url, id). 14 | 15 | ### Link: 16 | 17 | - https://huggingface.co/datasets/0x22almostEvil/reasoning_bg_oa 18 | 19 | ### Original Dataset is available here: 20 | 21 | - https://huggingface.co/datasets/reasoning_bg 22 | -------------------------------------------------------------------------------- /data/datasets/reasoning_gsm_qna_oa/README.MD: -------------------------------------------------------------------------------- 1 | # Dataset Card for GSM QnA reasoning with ~8.8K entries. 2 | 3 | ### Dataset Summary 4 | 5 | License: MIT. Contains Parquet of a list of instructions and answers (English 6 | only). Reasoning, logic and programming. 7 | 8 | Each row consists of 9 | 10 | - INSTRUCTION 11 | - RESPONSE 12 | - SOURCE 13 | - METADATA (json with language). 14 | 15 | ### Link: 16 | 17 | https://huggingface.co/datasets/0x22almostEvil/reasoning-gsm-qna-oa 18 | 19 | ### Original Datasets are available here: 20 | 21 | - https://huggingface.co/datasets/gsm8k 22 | - https://huggingface.co/datasets/reasoning-machines/gsm-hard 23 | -------------------------------------------------------------------------------- /data/datasets/semantics_ws_qna_oa/README.MD: -------------------------------------------------------------------------------- 1 | # Dataset Card for semantics-ws-qna-oa with ~2K entries. 2 | 3 | ### Dataset Summary 4 | 5 | License: Apache-2.0. Contains parquet of INSTRUCTION, RESPONSE, SOURCE and 6 | METADATA. 7 | 8 | - ### Original Datasets are available here: 9 | 10 | - https://leviants.com/multilingual-simlex999-and-wordsim353/ 11 | 12 | ### Paper of original Dataset: 13 | 14 | - https://arxiv.org/pdf/1508.00106v5.pdf 15 | -------------------------------------------------------------------------------- /data/datasets/soda_synthetic_dialogue/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/soda_synthetic_dialogue/__init__.py -------------------------------------------------------------------------------- /data/datasets/soda_synthetic_dialogue/hub.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | import datasets 4 | 5 | 6 | @dataclass 7 | class OpenAssistantConfig(datasets.BuilderConfig): 8 | """BuilderConfig for OpenAssistant datasets.""" 9 | 10 | name: str = None 11 | version: datasets.Version = None 12 | description: str = None 13 | schema: str = None 14 | subset_id: str = None 15 | 16 | 17 | features = datasets.Features( 18 | { 19 | "conversation": datasets.Value("string"), 20 | } 21 | ) 22 | -------------------------------------------------------------------------------- /data/datasets/tv_dialogue/requirements.txt: -------------------------------------------------------------------------------- 1 | beautifulsoup4 2 | kaggle 3 | numpy 4 | pandas 5 | pyarrow 6 | requests 7 | tqdm 8 | -------------------------------------------------------------------------------- /data/datasets/ubuntu_dialogue_qa/requirements.txt: -------------------------------------------------------------------------------- 1 | kaggle 2 | numpy 3 | pandas 4 | pyarrow 5 | tqdm 6 | -------------------------------------------------------------------------------- /data/datasets/youtube_subs_howto100M/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/youtube_subs_howto100M/__init__.py -------------------------------------------------------------------------------- /data/datasets/youtube_subs_howto100M/hub.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | 3 | import datasets 4 | 5 | 6 | @dataclass 7 | class OpenAssistantConfig(datasets.BuilderConfig): 8 | """BuilderConfig for OpenAssistant datasets.""" 9 | 10 | name: str = None 11 | version: datasets.Version = None 12 | description: str = None 13 | schema: str = None 14 | subset_id: str = None 15 | 16 | 17 | instruction_features = datasets.Features( 18 | { 19 | "instruction": datasets.Value("string"), 20 | "response": datasets.Value("string"), 21 | "source": datasets.Value("string"), 22 | } 23 | ) 24 | -------------------------------------------------------------------------------- /data/datasets/youtube_subs_howto100M/requirements.txt: -------------------------------------------------------------------------------- 1 | youtube-transcript-api==0.5.0 2 | -------------------------------------------------------------------------------- /data/datasets/zhihu-kol/.gitignore: -------------------------------------------------------------------------------- 1 | *.csv 2 | *.parquet 3 | *.out 4 | -------------------------------------------------------------------------------- /data/datasets/zhihu-kol/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/data/datasets/zhihu-kol/__init__.py -------------------------------------------------------------------------------- /data/datasets/zhihu-kol/upload_hf.py: -------------------------------------------------------------------------------- 1 | from datasets import Dataset 2 | 3 | ds = Dataset.from_parquet("dataset.parquet") 4 | ds.push_to_hub("wangrui6/Zhihu-KOL") 5 | -------------------------------------------------------------------------------- /data/dev-requirements.txt: -------------------------------------------------------------------------------- 1 | datasets>=2.8,<3.0.0 2 | -------------------------------------------------------------------------------- /deploy/README.md: -------------------------------------------------------------------------------- 1 | # Deployment files 2 | 3 | Copy these to the node you want to deploy to. 4 | -------------------------------------------------------------------------------- /deploy/dev-node/nginx/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | webserver: 5 | image: nginx:latest 6 | network_mode: host 7 | ports: 8 | - 80:80 9 | - 443:443 10 | restart: always 11 | volumes: 12 | - ./nginx.conf:/etc/nginx/nginx.conf:ro 13 | - ./certbot/www:/var/www/certbot/:ro 14 | - ./certbot/conf/:/etc/nginx/ssl/:ro 15 | certbot: 16 | image: certbot/certbot:latest 17 | volumes: 18 | - ./certbot/www/:/var/www/certbot/:rw 19 | - ./certbot/conf/:/etc/letsencrypt/:rw 20 | -------------------------------------------------------------------------------- /deploy/dev-node/nginx/get_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot certonly -m admin@open-assistant.io --agree-tos --webroot --webroot-path /var/www/certbot/ -d $1 4 | -------------------------------------------------------------------------------- /deploy/dev-node/nginx/renew_certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot renew 4 | -------------------------------------------------------------------------------- /deploy/prod-node/nginx/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | webserver: 5 | image: nginx:latest 6 | network_mode: host 7 | ports: 8 | - 80:80 9 | - 443:443 10 | restart: always 11 | volumes: 12 | - ./nginx.conf:/etc/nginx/nginx.conf:ro 13 | - ./certbot/www:/var/www/certbot/:ro 14 | - ./certbot/conf/:/etc/nginx/ssl/:ro 15 | certbot: 16 | image: certbot/certbot:latest 17 | volumes: 18 | - ./certbot/www/:/var/www/certbot/:rw 19 | - ./certbot/conf/:/etc/letsencrypt/:rw 20 | -------------------------------------------------------------------------------- /deploy/prod-node/nginx/get_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot certonly -m admin@open-assistant.io --agree-tos --webroot --webroot-path /var/www/certbot/ -d $1 4 | -------------------------------------------------------------------------------- /deploy/prod-node/nginx/renew_certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot renew 4 | -------------------------------------------------------------------------------- /deploy/prod2-node/nginx/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | webserver: 5 | image: nginx:latest 6 | network_mode: host 7 | ports: 8 | - 80:80 9 | - 443:443 10 | restart: always 11 | volumes: 12 | - ./nginx.conf:/etc/nginx/nginx.conf:ro 13 | - ./certbot/www:/var/www/certbot/:ro 14 | - ./certbot/conf/:/etc/nginx/ssl/:ro 15 | certbot: 16 | image: certbot/certbot:latest 17 | volumes: 18 | - ./certbot/www/:/var/www/certbot/:rw 19 | - ./certbot/conf/:/etc/letsencrypt/:rw 20 | -------------------------------------------------------------------------------- /deploy/prod2-node/nginx/get_cert.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot certonly -m admin@open-assistant.io --agree-tos --webroot --webroot-path /var/www/certbot/ -d $1 4 | -------------------------------------------------------------------------------- /deploy/prod2-node/nginx/renew_certs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker compose run --rm certbot renew 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/.env.sample: -------------------------------------------------------------------------------- 1 | TOKEN=Discord bot token 2 | CLIENT_ID=Discord bot id 3 | OA_APIKEY=OpenAssistant API key 4 | OA_APIURL=OpenAssistant API url 5 | INFERENCE_SERVER_API_KEY= 6 | INFERENCE_SERVER_HOST= 7 | REDIS_PASSWORD= 8 | DEFAULT_MODEL=default model if user does not specify one 9 | HUGGINGFACE_TOKEN=huggingface token 10 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/README.md: -------------------------------------------------------------------------------- 1 | # Open Assistant Discord bot 2 | 3 | This is a bot for the Open Assistant project. It is a Discord bot that allows 4 | you to interact with Open Assistant. 5 | 6 | ## Start bot 7 | 8 | 1. Install the dependencies with `npm install` 9 | 2. Change .env.sample to .env and fill in the values 10 | 3. Start redis database with `npm run redis:start` 11 | 4. Run the bot with `npm start` for development mode remember to restart the bot 12 | after every change. 13 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | services: 3 | cache: 4 | image: redis:latest 5 | restart: always 6 | ports: 7 | - "6379:6379" 8 | # get password from env 9 | command: 10 | redis-server --save 20 1 --loglevel warning --requirepass $REDIS_PASSWORD 11 | environment: 12 | - REDIS_PASSWORD=redispassword 13 | volumes: 14 | - cache:/data 15 | volumes: 16 | cache: 17 | driver: local 18 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/src/events/ready.ts: -------------------------------------------------------------------------------- 1 | import { Events, ActivityType } from "discord.js"; 2 | import chalk from "chalk"; 3 | 4 | export default { 5 | name: Events.ClientReady, 6 | once: true, 7 | async execute(client) { 8 | client.user.setPresence({ 9 | activities: [ 10 | { 11 | name: `v${client.version} | open-assistant.io`, 12 | type: ActivityType.Playing, 13 | }, 14 | ], 15 | status: "online", 16 | }); 17 | 18 | //const { data, error } = await supabase.from("conversations").delete(); 19 | console.log( 20 | chalk.white(`Ready! Logged in as `) + chalk.blue.bold(client.user.tag) 21 | ); 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/src/index.ts: -------------------------------------------------------------------------------- 1 | // Sharding 2 | import { ShardingManager } from "discord.js"; 3 | import "dotenv/config"; 4 | 5 | const manager = new ShardingManager("./dist/bot.js", { 6 | token: process.env.TOKEN, 7 | }); 8 | 9 | manager.on("shardCreate", (shard) => console.log(`Launched shard ${shard.id}`)); 10 | manager.spawn(); 11 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/src/modules/inference/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/discord-bots/oa-bot-js/src/modules/inference/index.ts -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/src/modules/open-assistant/interactions.ts: -------------------------------------------------------------------------------- 1 | import { labelInteraction } from "./interactions/label.js"; 2 | import { langInteraction } from "./interactions/lang.js"; 3 | import { taskInteraction } from "./interactions/task.js"; 4 | import { initInteraction } from "./interactions/init.js"; 5 | import { infoInteraction } from "./interactions/info.js"; 6 | 7 | export { 8 | labelInteraction, 9 | langInteraction, 10 | taskInteraction, 11 | initInteraction, 12 | infoInteraction, 13 | }; 14 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-js/src/modules/redis.ts: -------------------------------------------------------------------------------- 1 | import { createClient, defineScript } from "redis"; 2 | 3 | const redisClient = createClient({ 4 | password: process.env.REDIS_PASSWORD, 5 | }); 6 | 7 | redisClient.on("error", (err) => console.log("Client error: Redis", err)); 8 | 9 | await redisClient.connect(); 10 | 11 | export default redisClient; 12 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/.env.example: -------------------------------------------------------------------------------- 1 | BOT_TOKEN= 2 | DECLARE_GLOBAL_COMMANDS= 3 | OWNER_IDS=[, ] 4 | PREFIX="/" # DO NOT LEAVE EMPTY, slash command prefix in DMs 5 | 6 | OASST_API_URL="http://localhost:8080" # No trailing '/' 7 | OASST_API_KEY="1234" 8 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | *.egg-info/ 3 | __pycache__/ 4 | 5 | .venv 6 | .nox 7 | .env 8 | 9 | # Database files 10 | *.db 11 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/bot/__init__.py: -------------------------------------------------------------------------------- 1 | """The official Open-Assistant Discord Bot.""" 2 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/bot/__main__.py: -------------------------------------------------------------------------------- 1 | """Entry point for the bot.""" 2 | import logging 3 | import os 4 | 5 | from bot.bot import bot 6 | from hikari.presences import Activity, ActivityType, Status 7 | 8 | logger = logging.getLogger(__name__) 9 | 10 | if __name__ == "__main__": 11 | if os.name != "nt": 12 | import uvloop 13 | 14 | uvloop.install() 15 | 16 | logger.info("Starting bot") 17 | bot.run( 18 | check_for_updates=True, 19 | activity=Activity( 20 | name="/help", 21 | type=ActivityType.PLAYING, 22 | ), 23 | status=Status.ONLINE, 24 | ) 25 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/bot/db/schema.sql: -------------------------------------------------------------------------------- 1 | -- Sqlite3 schema for the bot 2 | CREATE TABLE IF NOT EXISTS guild_settings ( 3 | guild_id BIGINT NOT NULL PRIMARY KEY, 4 | log_channel_id BIGINT 5 | ); 6 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/bot/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | """Extensions for the bot. 2 | 3 | See: https://hikari-lightbulb.readthedocs.io/en/latest/guides/extensions.html 4 | """ 5 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/requirements.txt: -------------------------------------------------------------------------------- 1 | aiosqlite == 0.18.0 # database 2 | hikari-lightbulb == 2.3.1 # command handler 3 | hikari-miru == 2.0.2 # modals and buttons 4 | hikari[speedups] == 2.0.0.dev115 # discord framework 5 | loguru == 0.6.0 6 | pydantic[dotenv] == 1.10.4 7 | 8 | uvloop == 0.17.0; os_name != 'nt' # Faster drop-in replacement for asyncio event loop 9 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/boot.msg: -------------------------------------------------------------------------------- 1 | ``` 2 | ________ __ 3 | \_____ \ _____ ______ _______/ |_ 4 | / | \\__ \ / ___// ___/\ __\ 5 | / | \/ __ \_\___ \ \___ \ | | 6 | \_______ (____ /____ >____ > |__| 7 | \/ \/ \/ \/ 8 | 9 | {{bot_name}} {{version}} 10 | git hash: {{git_hash}} 11 | debug_mode: {{debug}} 12 | ``` 13 | https://github.com/LAION-AI/Open-Assistant 14 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/help.msg: -------------------------------------------------------------------------------- 1 | **Open-Assistant Bot Help** 2 | 3 | Available slash-commands: 4 | 5 | `/work` Requests a new personalized human feedback task 6 | `/help` Show this message 7 | 8 | {% if is_bot_owner %} 9 | Commands for bot owners: 10 | 11 | `!sync` 12 | `!sync.guild` 13 | `!sync.copy_global` 14 | `!sync.clear_guild` 15 | {% endif %} 16 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_assistant_reply.msg: -------------------------------------------------------------------------------- 1 | Act as the assistant and reply to the user. 2 | Here is the conversation so far: 3 | {% for message in task.conversation.messages %} 4 | {% if message.is_assistant %} 5 | :robot: Assistant: 6 | {{ message.text }} 7 | {% else %} 8 | :person_red_hair: User: 9 | **{{ message.text }}**" 10 | {% endif %} 11 | {% endfor %} 12 | :robot: Assistant: { human, pls help me! ... } 13 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_initial_prompt.msg: -------------------------------------------------------------------------------- 1 | Please provide an initial prompt to the assistant. 2 | {% if task.hint is not none %} 3 | Hint: {{task.hint}} 4 | {% endif %} 5 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_prompter_reply.msg: -------------------------------------------------------------------------------- 1 | Please provide a reply to the assistant. 2 | Here is the conversation so far: 3 | {% for message in task.conversation.messages %}{% if message.is_assistant %} 4 | :robot: Assistant: 5 | {{ message.text }} 6 | {% else %} 7 | :person_red_hair: User: 8 | **{{ message.text }}**" 9 | {% endif %}{% endfor %} 10 | {% if task.hint %} 11 | Hint: {{ task.hint }} 12 | {% endif %} 13 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_rank_conversation_replies.msg: -------------------------------------------------------------------------------- 1 | Here is the conversation so far: 2 | {% for message in task.conversation.messages %}{% if message.is_assistant %} 3 | :robot: Assistant: 4 | {{ message.text }} 5 | {% else %} 6 | :person_red_hair: User: 7 | **{{ message.text }}**" 8 | {% endif %}{% endfor %} 9 | Rank the following replies: 10 | {% for reply in task.replies %} 11 | {{loop.index}}: {{reply}}{% endfor %} 12 | 13 | :scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). 14 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_rank_initial_prompts.msg: -------------------------------------------------------------------------------- 1 | Rank the following prompts: 2 | {% for prompt in task.prompts %} 3 | {{loop.index}}: {{prompt}}{% endfor %} 4 | 5 | :scroll: Reply with the numbers of best to worst prompts separated by commas (example: "4,1,3,2"). 6 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_rate_summary.msg: -------------------------------------------------------------------------------- 1 | Rate the following summary: 2 | {{task.summary}} 3 | 4 | Full text: 5 | {{task.full_text}} 6 | 7 | Rating scale: {{task.scale.min}} - {{task.scale.max}} 8 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/task_summarize_story.msg: -------------------------------------------------------------------------------- 1 | Summarize to the following story: 2 | {{task.story}} 3 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_assistant_reply.msg: -------------------------------------------------------------------------------- 1 | :robot: **Challenge: Assistant Reply** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_initial_prompt.msg: -------------------------------------------------------------------------------- 1 | :microphone2: **Challenge: Initial Prompt** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_prompter_reply.msg: -------------------------------------------------------------------------------- 1 | :person_red_hair: **Challenge: User Reply** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_rank_conversation_replies.msg: -------------------------------------------------------------------------------- 1 | :bar_chart: **Challenge: Rank Replies** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_rank_initial_prompts.msg: -------------------------------------------------------------------------------- 1 | :bar_chart: **Challenge: Rank Initial Prompts** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_rate_summary.msg: -------------------------------------------------------------------------------- 1 | :ballot_box: **Challenge: Rate Summary** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/teaser_summarize_story.msg: -------------------------------------------------------------------------------- 1 | :books: **Challenge: Summarize Story** 2 | 3 | :point_down: Work on it here (:fire: Thread will self-destruct at {{ expiry_time }}, {{ expiry_relative }}). 4 | -------------------------------------------------------------------------------- /discord-bots/oa-bot-py/templates/welcome.msg: -------------------------------------------------------------------------------- 1 | Hi there, 2 | 3 | I am the **Open-Assistant Junior Bot** 🤖. I would love to get your feedback 🤗! 4 | Currently I am still learning from human demonstrations how to reply to instructions. When I am grown up I want to become a fully functional AI Assistant language model that is fully open-sourced and assists millions of humans all over the world. 5 | 6 | Type `/tutorial` to start the tutorial or `/help` to see a list of all my commands. 7 | -------------------------------------------------------------------------------- /docker/Dockerfile.discord-bot: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim-bullseye 2 | RUN mkdir /app 3 | WORKDIR /app 4 | COPY ./discord-bots/oa-bot-py /app 5 | COPY ./oasst-shared/oasst_shared /app/oasst_shared 6 | RUN pip install -r requirements.txt 7 | CMD ["python","-m","bot"] 8 | -------------------------------------------------------------------------------- /docker/grafana/README.md: -------------------------------------------------------------------------------- 1 | # Grafana 2 | 3 | [Grafana](https://github.com/grafana/grafana) is used to visualize custom 4 | observability metrics and much more. 5 | 6 | This folder contains various configuration files for Grafana. 7 | 8 | - [`./dashboards/dashboard.yaml`](./dashboards/dashboard.yaml) - Used to tell 9 | Grafana where some pre-configured dashboards live. 10 | - [`./dashboards/fastapi-backend.json`](./dashboards/fastapi-backend.json) - A 11 | json representation of a saved Grafana dashboard focusing on some high level 12 | api endpoint metrics etc. 13 | - [`./datasources/datasource.yml`](./datasources/datasource.yml) - A config file 14 | to set up Grafana to read from the local Prometheus source. 15 | -------------------------------------------------------------------------------- /docker/grafana/dashboards/dashboard.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: "Dashboard provider" 5 | orgId: 1 6 | type: file 7 | disableDeletion: false 8 | updateIntervalSeconds: 10 9 | allowUiUpdates: false 10 | options: 11 | path: /var/lib/grafana/dashboards 12 | foldersFromFilesStructure: true 13 | -------------------------------------------------------------------------------- /docker/grafana/datasources/datasource.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: Prometheus 5 | type: prometheus 6 | url: http://prometheus:9090 7 | isDefault: true 8 | access: proxy 9 | editable: true 10 | -------------------------------------------------------------------------------- /docker/netdata/go.d/postgres.conf: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: db 3 | dsn: 'postgres://postgres:postgres@db:5432/postgres' 4 | - name: webdb 5 | dsn: 'postgres://postgres:postgres@webdb:5432/oasst_web' 6 | -------------------------------------------------------------------------------- /docker/netdata/go.d/prometheus.conf: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: backend 3 | url: http://backend:8080/metrics 4 | 5 | - name: inference-server 6 | url: http://inference-server:8080/metrics 7 | -------------------------------------------------------------------------------- /docker/netdata/go.d/redis.conf: -------------------------------------------------------------------------------- 1 | jobs: 2 | - name: redis 3 | address: 'redis://@redis:6379' 4 | -------------------------------------------------------------------------------- /docker/oasst-postgres/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM postgres:15 2 | 3 | # install unzip 4 | RUN apt-get update && apt-get install -y unzip curl && rm -rf /var/lib/apt/lists/* 5 | 6 | # download aws cli 7 | RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" 8 | RUN unzip -q awscliv2.zip 9 | RUN ./aws/install 10 | 11 | COPY ./backup_pg_to_s3.sh . 12 | -------------------------------------------------------------------------------- /docker/oasst-postgres/backup_pg_to_s3.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # filename with timestamp 7 | filename="postgres-$S3_PREFIX-$(date +%Y-%m-%d_%H-%M-%S).sql.gz" 8 | 9 | # perform pg_dump 10 | pg_dump -U postgres postgres | gzip -c > /tmp/$filename 11 | 12 | # upload to s3 13 | aws s3 cp /tmp/$filename s3://$S3_BUCKET_NAME/$filename 14 | 15 | rm /tmp/$filename 16 | -------------------------------------------------------------------------------- /docker/prometheus/README.md: -------------------------------------------------------------------------------- 1 | # Prometheus 2 | 3 | [Prometheus](https://github.com/prometheus/prometheus) is an open source 4 | monitoring system. 5 | 6 | This folder contains some configuration files used to set up Prometheus. 7 | 8 | - [`./prometheus.yml`](./prometheus.yml) - Config for Prometheus, including what 9 | `/metrics` endpoints to scrape. 10 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | node_modules 3 | /.yarn 4 | 5 | # Production 6 | build 7 | 8 | # Generated files 9 | .docusaurus 10 | .cache-loader 11 | 12 | # Misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /docs/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | -------------------------------------------------------------------------------- /docs/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [require.resolve("@docusaurus/core/lib/babel/preset")], 3 | }; 4 | -------------------------------------------------------------------------------- /docs/blog/2023-02-05-we-need-your-help.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: We Need Your Help! 3 | description: We Need Your Help! 4 | slug: we-need-your-help 5 | authors: [yk, andreaskoepf, ontocord, christophschuhmann] 6 | tags: [open-assistant] 7 | image: https://img.youtube.com/vi/64Izfm24FKA/0.jpg 8 | --- 9 | 10 | import ReactPlayer from "react-player"; 11 | 12 | We Need Your Help! 13 | 14 | Help us collect data for OpenAssistant, the largest and most open alternative to 15 | ChatGPT. 16 | 17 | https://open-assistant.io 18 | 19 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /docs/blog/2023-04-06-open-assistant-first-models-are-here/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Open Assistant First Models are here! 3 | description: Open Assistant First Models are here! 4 | authors: [yk] 5 | tags: [open-assistant, youtube] 6 | image: https://img.youtube.com/vi/Hi6cbeBY2oQ/0.jpg 7 | --- 8 | 9 | import ReactPlayer from "react-player"; 10 | 11 | Hello hello! we're finally here the first models of open Assistant are out and 12 | I'm going to show you a little bit of what you can do with them! 13 | 14 | https://open-assistant.io/chat 15 | 16 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /docs/blog/2023-04-10-open-assistant-livestream-just-chatting/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: AI Alignment Livestream (aka OpenAssistant "Just Chatting") 3 | description: AI Alignment Livestream (aka OpenAssistant "Just Chatting") 4 | authors: [yk] 5 | tags: [open-assistant, youtube] 6 | image: https://img.youtube.com/vi/5IymlBZDw-0/0.jpg 7 | --- 8 | 9 | import ReactPlayer from "react-player"; 10 | 11 | Livestream playing around with Open Assistant and AI alignment :) 12 | 13 | https://open-assistant.io/chat 14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/blog/2023-04-21-open-assistant-storms-youtube/img/img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/blog/2023-04-21-open-assistant-storms-youtube/img/img.png -------------------------------------------------------------------------------- /docs/blog/2023-10-25-open-assistant-is-completed/index.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: OpenAssistant is Completed! 3 | description: OpenAssistant is Completed! 4 | authors: [yk] 5 | tags: [open-assistant, youtube] 6 | image: https://img.youtube.com/vi/gqtmUHhaplo/0.jpg 7 | --- 8 | 9 | import ReactPlayer from "react-player"; 10 | 11 | 16 | 17 | The final published oasst2 dataset can be found on HuggingFace at 18 | [OpenAssistant/oasst2](https://huggingface.co/datasets/OpenAssistant/oasst2). 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/docs/architecture/README.md: -------------------------------------------------------------------------------- 1 | # Architecture 2 | 3 | ## Inference 4 | 5 | The Inference architecture is comprised of several core components: a text, or 6 | frontend client, a FastAPI webserver, a database with several tables, Reddis 7 | used for queueing, and distributed gpu workers. 8 | 9 | A more detailed overview can be viewed [here](inference.md). 10 | -------------------------------------------------------------------------------- /docs/docs/data/README.md: -------------------------------------------------------------------------------- 1 | # Data 2 | 3 | Resources related to data: 4 | 5 | - [Data schemas](schemas.mdx) 6 | - [Datasets](datasets.md) 7 | - [Data augmentation](augmentation.md) 8 | - [Supervised datasets](supervised-datasets.md) 9 | -------------------------------------------------------------------------------- /docs/docs/data/img/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/docs/data/img/db.png -------------------------------------------------------------------------------- /docs/docs/data/img/webdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/docs/data/img/webdb.png -------------------------------------------------------------------------------- /docs/docs/guides/README.md: -------------------------------------------------------------------------------- 1 | # Guides 2 | 3 | Useful guides for Open Assistant: 4 | 5 | - [General guidelines for using open-assistant.io](guidelines.md) 6 | - [Example responses](examples.md) 7 | - [Developer guide, contains a lot of technical info](developers.md) 8 | -------------------------------------------------------------------------------- /docs/docs/plugins/README.md: -------------------------------------------------------------------------------- 1 | # Plugins 2 | 3 | - [Getting Started](/plugins/getting-started.md) 4 | - [Plugins List](/plugins/list.md) 5 | - [Plugins Technical Details](/plugins/details.md) 6 | 7 | :::note 8 | 9 | In the GitHub repo You can see all issues and PR's with the 10 | [`plugins`](https://github.com/LAION-AI/Open-Assistant/issues?q=label%3Aplugins) 11 | label if you want to dive deeper. 12 | 13 | The docs here are mostly for end users of plugins or those getting familiar at a 14 | high level. 15 | 16 | ::: 17 | -------------------------------------------------------------------------------- /docs/docs/plugins/getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | ## Quick Start 4 | 5 | Use the "Web Retriever" plugin by adding this url: 6 | https://web-retriever-draganjovanovich.vercel.app/ai-plugin.json 7 | 8 | You should then be able to use it like this: 9 | 10 | ![plugin-quickstart](./img/plugins-quickstart.png) 11 | 12 | ## Inspect Results 13 | 14 | Once you get results back from a plugin you can explore the various internal 15 | steps the plugin took to get the results. 16 | 17 | ![plugin-inspect](./img/plugins-inspect.png) 18 | -------------------------------------------------------------------------------- /docs/docs/plugins/img/plugins-inspect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/docs/plugins/img/plugins-inspect.png -------------------------------------------------------------------------------- /docs/docs/plugins/img/plugins-quickstart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/docs/plugins/img/plugins-quickstart.png -------------------------------------------------------------------------------- /docs/docs/presentations/README.md: -------------------------------------------------------------------------------- 1 | # Presentations 2 | 3 | Useful presentations that have been published about the project. 4 | 5 | - [OpenAssistant Roadmap](https://docs.google.com/presentation/d/1n7IrAOVOqwdYgiYrXc8Sj0He8krn5MVZO_iLkCjTtu0/edit?usp=sharing): 6 | High level vison and roadmap (December 2022). 7 | - [OpenAssistant MVP](https://docs.google.com/presentation/d/1MXH5kJcew7h1aA9PBx2MirkEkjCBLnABbbrPsgbcyQg/edit?usp=sharing): 8 | Goal: Crowd-Sourced Training Data Collection (January 2023). 9 | -------------------------------------------------------------------------------- /docs/docs/research/README.md: -------------------------------------------------------------------------------- 1 | # Research 2 | 3 | Useful research materials: 4 | 5 | - [General](general.md) 6 | - [Cohere Grounded QA](search-based-qa.md) 7 | -------------------------------------------------------------------------------- /docs/docs/tasks/README.md: -------------------------------------------------------------------------------- 1 | # Tasks 2 | 3 | Understand a bit more about each type of task required to build the Open 4 | Assistant dataset. 5 | 6 | - [Classifying an assistant reply](label_assistant_reply.md) 7 | - [Classifying an initial prompt of user reply](label_prompter_reply.md) 8 | - [Providing an assistant reply](reply_as_assistant.md) 9 | - [Providing an initial prompt or user reply](reply_as_user.md) 10 | - [Ranking assistant replies](rank_assistant_replies.md) 11 | -------------------------------------------------------------------------------- /docs/src/components/HomepageFeatures/styles.module.css: -------------------------------------------------------------------------------- 1 | .features { 2 | display: flex; 3 | align-items: center; 4 | padding: 2rem 0; 5 | width: 100%; 6 | } 7 | 8 | .featureSvg { 9 | height: 200px; 10 | width: 200px; 11 | } 12 | -------------------------------------------------------------------------------- /docs/src/pages/index.module.css: -------------------------------------------------------------------------------- 1 | /** 2 | * CSS files with the .module.css suffix will be treated as CSS modules 3 | * and scoped locally. 4 | */ 5 | 6 | .heroBanner { 7 | padding: 4rem 0; 8 | text-align: center; 9 | position: relative; 10 | overflow: hidden; 11 | } 12 | 13 | @media screen and (max-width: 996px) { 14 | .heroBanner { 15 | padding: 2rem; 16 | } 17 | } 18 | 19 | .buttons { 20 | display: flex; 21 | align-items: center; 22 | justify-content: center; 23 | } 24 | -------------------------------------------------------------------------------- /docs/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/docs/static/.nojekyll -------------------------------------------------------------------------------- /inference/.gitignore: -------------------------------------------------------------------------------- 1 | .pytest_cache 2 | -------------------------------------------------------------------------------- /inference/safety/README.md: -------------------------------------------------------------------------------- 1 | # OpenAssistant Inference Safety Server 2 | 3 | Basic FastAPI server to serve safety models using 4 | [Blade2Blade](https://github.com/LAION-AI/blade2blade/). 5 | -------------------------------------------------------------------------------- /inference/safety/requirements.txt: -------------------------------------------------------------------------------- 1 | blade2blade 2 | fastapi 3 | loguru 4 | pydantic 5 | uvicorn 6 | -------------------------------------------------------------------------------- /inference/safety/safety_main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | uvicorn main:app --host 0.0.0.0 --port "$PORT" 4 | -------------------------------------------------------------------------------- /inference/safety/settings.py: -------------------------------------------------------------------------------- 1 | import pydantic 2 | 3 | 4 | class Settings(pydantic.BaseSettings): 5 | # HuggingFace model ID for the model to load in blade2blade 6 | safety_model_name: str = "shahules786/blade2blade-t5-base" 7 | 8 | 9 | settings = Settings() 10 | -------------------------------------------------------------------------------- /inference/server/README.md: -------------------------------------------------------------------------------- 1 | # OpenAssistant Inference Server 2 | 3 | Workers communicate with the `/work` endpoint via Websocket. They provide their 4 | configuration and if a task is available, the server returns it. The worker then 5 | performs the task and returns the result in a streaming fashion to the server, 6 | also via websocket. 7 | 8 | Clients first call `/chat` to make a new chat, then add to that via 9 | `/chat//message`. The response is a SSE event source, which will send tokens 10 | as they are available. 11 | -------------------------------------------------------------------------------- /inference/server/alembic/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. 2 | -------------------------------------------------------------------------------- /inference/server/alembic/script.py.mako: -------------------------------------------------------------------------------- 1 | """${message} 2 | 3 | Revision ID: ${up_revision} 4 | Revises: ${down_revision | comma,n} 5 | Create Date: ${create_date} 6 | 7 | """ 8 | from alembic import op 9 | import sqlalchemy as sa 10 | import sqlmodel 11 | ${imports if imports else ""} 12 | 13 | # revision identifiers, used by Alembic. 14 | revision = ${repr(up_revision)} 15 | down_revision = ${repr(down_revision)} 16 | branch_labels = ${repr(branch_labels)} 17 | depends_on = ${repr(depends_on)} 18 | 19 | 20 | def upgrade() -> None: 21 | ${upgrades if upgrades else "pass"} 22 | 23 | 24 | def downgrade() -> None: 25 | ${downgrades if downgrades else "pass"} 26 | -------------------------------------------------------------------------------- /inference/server/alembic/versions/.gitinclude: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/inference/server/alembic/versions/.gitinclude -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/inference/server/oasst_inference_server/__init__.py -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/models/__init__.py: -------------------------------------------------------------------------------- 1 | from .chat import DbChat, DbMessage, DbMessageEval, DbReport 2 | from .user import DbRefreshToken, DbUser 3 | from .worker import DbWorker, DbWorkerComplianceCheck, DbWorkerEvent, WorkerEventType 4 | 5 | __all__ = [ 6 | "DbChat", 7 | "DbMessage", 8 | "DbMessageEval", 9 | "DbReport", 10 | "DbRefreshToken", 11 | "DbUser", 12 | "DbWorker", 13 | "DbWorkerComplianceCheck", 14 | "DbWorkerEvent", 15 | "WorkerEventType", 16 | ] 17 | -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | from oasst_inference_server.plugins.gale_pleaser.main import app as gale_pleaser 2 | from oasst_inference_server.plugins.gale_roaster.main import app as gale_roaster 3 | from oasst_inference_server.plugins.web_retriever.main import app as web_retriever 4 | 5 | # dict of registered plugins 6 | # The key defines a plugin's path which will be appended to the configured PLUGINS_PATH_PREFIX. 7 | plugin_apps = { 8 | "/gale_pleaser": gale_pleaser, 9 | "/gale_roaster": gale_roaster, 10 | "/web_retriever": web_retriever, 11 | } 12 | -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/plugins/gale_pleaser/README.md: -------------------------------------------------------------------------------- 1 | The gale-pleaser is a funny simple demo-plugin that generates a positive and 2 | encouraging response message for the users. 3 | 4 | The internal prompt used contains the following instructions: 5 | 6 | ``` 7 | Try to be funny and verbose, but super nice and pleasing at the same time. 8 | Please follow these rules: 9 | 1. Let your message be long, and with calm emojis. 10 | 2. Tell the user how awesome he is, and how much you love him. 11 | 3. Tell him how much you love his work, and how much you appreciate him. 12 | 4. Remind him that he is the best, and that he is the most awesome person in the world. 13 | ``` 14 | -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/plugins/gale_pleaser/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/inference/server/oasst_inference_server/plugins/gale_pleaser/icon.png -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/plugins/web_retriever/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/inference/server/oasst_inference_server/plugins/web_retriever/icon.png -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/routes/account.py: -------------------------------------------------------------------------------- 1 | import fastapi 2 | from fastapi import Depends 3 | from oasst_inference_server import admin, auth, database, deps 4 | 5 | router = fastapi.APIRouter( 6 | prefix="/account", 7 | tags=["account"], 8 | ) 9 | 10 | 11 | @router.delete("/") 12 | async def handle_account_deletion( 13 | user_id: str = Depends(auth.get_current_user_id), 14 | session: database.AsyncSession = Depends(deps.create_session), 15 | ) -> fastapi.Response: 16 | await admin.delete_user_from_db(session, user_id) 17 | return fastapi.Response(status_code=200) 18 | -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/schemas/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/inference/server/oasst_inference_server/schemas/__init__.py -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/schemas/auth.py: -------------------------------------------------------------------------------- 1 | import json 2 | from base64 import b64decode 3 | 4 | import pydantic 5 | from pydantic import validator 6 | 7 | 8 | class TrustedClient(pydantic.BaseModel): 9 | api_key: str 10 | client: str # "website", "discord", or similar 11 | user_id: str # the id of the user in the data backend 12 | provider_account_id: str # id of the user in the client 13 | username: str 14 | 15 | 16 | class TrustedClientToken(pydantic.BaseModel): 17 | content: TrustedClient 18 | 19 | @validator("content", pre=True) 20 | def parse(token: str): 21 | return json.loads(b64decode(token)) 22 | -------------------------------------------------------------------------------- /inference/server/oasst_inference_server/schemas/worker.py: -------------------------------------------------------------------------------- 1 | import pydantic 2 | 3 | 4 | class CreateWorkerRequest(pydantic.BaseModel): 5 | name: str 6 | trusted: bool = False 7 | 8 | 9 | class WorkerRead(pydantic.BaseModel): 10 | id: str 11 | name: str 12 | api_key: str 13 | trusted: bool 14 | 15 | class Config: 16 | orm_mode = True 17 | -------------------------------------------------------------------------------- /inference/server/requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | alembic 3 | asyncpg 4 | authlib 5 | beautifulsoup4 # web_retriever plugin 6 | cryptography==39.0.0 7 | fastapi-limiter 8 | fastapi[all]==0.88.0 9 | google-api-python-client 10 | google-auth-httplib2 11 | google-auth-oauthlib 12 | gunicorn 13 | loguru 14 | nvidia-ml-py 15 | prometheus-fastapi-instrumentator 16 | psutil 17 | pydantic 18 | pynvml 19 | PyPDF2 # web_retriever plugin 20 | python-jose[cryptography]==3.3.0 21 | pyyaml # web_retriever plugin 22 | redis 23 | sqlmodel 24 | sse-starlette 25 | uuid7==0.1.0 26 | uvicorn[standard] 27 | websockets 28 | -------------------------------------------------------------------------------- /inference/server/server_main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | gunicorn_workers=${GUNICORN_WORKERS:-1} 4 | 5 | # if 1 worker, stay with uvicorn 6 | if [ $gunicorn_workers -eq 1 ]; then 7 | unset PROMETHEUS_MULTIPROC_DIR 8 | uvicorn main:app --host 0.0.0.0 --port "$PORT" 9 | else 10 | if [ -d "${PROMETHEUS_MULTIPROC_DIR}" ]; then rm -rf "${PROMETHEUS_MULTIPROC_DIR}"; fi 11 | mkdir -p "${PROMETHEUS_MULTIPROC_DIR}" 12 | port=${PORT:-8080} 13 | gunicorn main:app --workers $gunicorn_workers --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:$port 14 | fi 15 | -------------------------------------------------------------------------------- /inference/text-client/requirements.txt: -------------------------------------------------------------------------------- 1 | loguru 2 | requests 3 | sseclient-py 4 | typer 5 | -------------------------------------------------------------------------------- /inference/worker/download_model.py: -------------------------------------------------------------------------------- 1 | import os 2 | import signal 3 | import sys 4 | 5 | import transformers 6 | 7 | 8 | def terminate(signum, frame): 9 | print("Terminating...") 10 | sys.exit(0) 11 | 12 | 13 | if __name__ == "__main__": 14 | signal.signal(signal.SIGINT, terminate) 15 | model_id = os.getenv("MODEL_ID") 16 | if "llama" in model_id.lower(): 17 | transformers.LlamaTokenizer.from_pretrained(model_id) 18 | transformers.LlamaForCausalLM.from_pretrained(model_id) 19 | else: 20 | transformers.AutoTokenizer.from_pretrained(model_id) 21 | transformers.AutoModelForCausalLM.from_pretrained(model_id) 22 | -------------------------------------------------------------------------------- /inference/worker/download_model_hf.py: -------------------------------------------------------------------------------- 1 | import os 2 | import signal 3 | import sys 4 | from pathlib import Path 5 | 6 | import huggingface_hub 7 | 8 | 9 | def terminate(signum, frame): 10 | print("Terminating...") 11 | sys.exit(0) 12 | 13 | 14 | if __name__ == "__main__": 15 | signal.signal(signal.SIGINT, terminate) 16 | model_id = os.getenv("MODEL_ID") 17 | snapshot_dir = Path(huggingface_hub.snapshot_download(model_id)) 18 | for file in snapshot_dir.rglob("*.json"): 19 | text = file.read_text() 20 | text = text.replace("LLaMA", "Llama") 21 | file.write_text(text) 22 | -------------------------------------------------------------------------------- /inference/worker/requirements-hf.txt: -------------------------------------------------------------------------------- 1 | accelerate 2 | bitsandbytes 3 | fastapi 4 | huggingface_hub 5 | sse-starlette 6 | torch 7 | uvicorn 8 | -------------------------------------------------------------------------------- /inference/worker/requirements.txt: -------------------------------------------------------------------------------- 1 | aiohttp 2 | hf_transfer 3 | huggingface_hub 4 | langchain==0.0.142 5 | loguru 6 | lorem 7 | nvidia-ml-py 8 | psutil 9 | pydantic 10 | requests 11 | sentencepiece 12 | sseclient-py 13 | git+https://github.com/huggingface/transformers@main#egg=transformers 14 | websocket-client 15 | -------------------------------------------------------------------------------- /inference/worker/worker_standalone_main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export HF_HOME=${HF_HOME:-"$HOME/.cache/huggingface"} 4 | load_sleep=${LOAD_SLEEP:-0} 5 | 6 | mkdir -p $HF_HOME 7 | echo -n "$HF_TOKEN" > $HF_HOME/token 8 | 9 | export HUGGING_FACE_HUB_TOKEN=$HF_TOKEN 10 | 11 | export MODEL_CONFIG_NAME=${MODEL_CONFIG_NAME:-"OA_SFT_Pythia_12B"} 12 | export MODEL_ID=$(python get_model_config_prop.py model_id) 13 | export QUANTIZE=$(python get_model_config_prop.py quantized) 14 | 15 | echo "Downloading model $MODEL_ID" 16 | CUDA_VISIBLE_DEVICES="" python download_model_hf.py 17 | 18 | export MAX_PARALLEL_REQUESTS=${MAX_PARALLEL_REQUESTS:-1} 19 | 20 | echo "starting worker" 21 | python3 __main__.py 22 | -------------------------------------------------------------------------------- /inlang.config.js: -------------------------------------------------------------------------------- 1 | export async function defineConfig(env) { 2 | const { default: i18nextPlugin } = await env.$import( 3 | "https://cdn.jsdelivr.net/npm/@inlang/plugin-i18next@2/dist/index.js" 4 | ); 5 | const { default: standardLintRules } = await env.$import( 6 | "https://cdn.jsdelivr.net/gh/inlang/standard-lint-rules@2/dist/index.js" 7 | ); 8 | 9 | return { 10 | referenceLanguage: "en", 11 | plugins: [ 12 | i18nextPlugin({ 13 | pathPattern: "./website/public/locales/{language}/*.json", 14 | }), 15 | standardLintRules(), 16 | ], 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /model/.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | wandb 3 | saved_model 4 | .saved_models 5 | -------------------------------------------------------------------------------- /model/model_eval/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/model/model_eval/__init__.py -------------------------------------------------------------------------------- /model/model_eval/manual/requirements.txt: -------------------------------------------------------------------------------- 1 | tqdm==4.64.1 2 | transformers==4.26.1 3 | -------------------------------------------------------------------------------- /model/model_eval/sample_results/comparison.json: -------------------------------------------------------------------------------- 1 | { 2 | "rejected_samples": { 3 | "mean": "-1.9255", 4 | "min": "-3.12", 5 | "max": "-0.5" 6 | }, 7 | "selected_samples": { 8 | "mean": "-1.0873333333333335", 9 | "min": "-2.82", 10 | "max": "0.26" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /model/model_eval/sample_results/theblackcat102-pythia-12b-deduped-sft.json: -------------------------------------------------------------------------------- 1 | { 2 | "model_name": "theblackcat102/pythia-12b-deduped-sft", 3 | "results": { 4 | "beam5": -1.563840627670288, 5 | "greedy": -0.8911840915679932, 6 | "k50": -0.9620318412780762, 7 | "magic_numbers": -0.9397581219673157, 8 | "mean_reward": "-1.1174922" 9 | }, 10 | "reward_model": "andreaskoepf/oasst-rm-1-pythia-1b" 11 | } 12 | -------------------------------------------------------------------------------- /model/model_training/.gitignore: -------------------------------------------------------------------------------- 1 | .cache 2 | wandb 3 | saved_model 4 | saved_model* 5 | .saved_model* 6 | .save_model* 7 | llama_model 8 | models-* 9 | model_store_* 10 | singularity 11 | tritonserver-pyt.sif 12 | ckpts_pythia12b 13 | model_rl 14 | .saved 15 | .triton_models 16 | triton_models 17 | ckpts 18 | -------------------------------------------------------------------------------- /model/model_training/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/model/model_training/__init__.py -------------------------------------------------------------------------------- /model/model_training/configs/accelerate_config.yaml: -------------------------------------------------------------------------------- 1 | compute_environment: LOCAL_MACHINE 2 | deepspeed_config: 3 | deepspeed_config_file: /mnt/data/Open-Assistant-RLHF/model/model_training/configs/deepspeed_rl.json 4 | zero3_init_flag: false 5 | distributed_type: DEEPSPEED 6 | downcast_bf16: "no" 7 | machine_rank: 0 8 | main_training_function: main 9 | num_machines: 1 10 | num_processes: 3 11 | rdzv_backend: static 12 | same_network: true 13 | tpu_env: [] 14 | tpu_use_cluster: false 15 | tpu_use_sudo: false 16 | use_cpu: false 17 | -------------------------------------------------------------------------------- /model/model_training/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/model/model_training/tests/__init__.py -------------------------------------------------------------------------------- /model/model_training/tests/resources/data_collator/special_tokens_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "additional_special_tokens": [ 3 | "<|prompter|>", 4 | "<|assistant|>", 5 | "<|system|>", 6 | "<|prefix_begin|>", 7 | "<|prefix_end|>" 8 | ], 9 | "bos_token": "<|endoftext|>", 10 | "eos_token": "<|endoftext|>", 11 | "pad_token": "<|padding|>", 12 | "sep_token": "<|endoftext|>", 13 | "unk_token": "<|endoftext|>" 14 | } 15 | -------------------------------------------------------------------------------- /model/model_training/tests/test_oasst_dataset.py: -------------------------------------------------------------------------------- 1 | from argparse import Namespace 2 | 3 | import pytest 4 | from model_training.custom_datasets import get_one_dataset 5 | 6 | 7 | @pytest.mark.skip(reason="cache not populated") 8 | def test_load_oasst_export_dataset(): 9 | config = Namespace( 10 | cache_dir=".cache", 11 | ) 12 | kwargs = { 13 | "lang": "en,es,de,fr", 14 | "top_k": 2, 15 | "input_file_path": "2023-02-19_oasst_ready_with_spam_deleted.jsonl.gz", 16 | } 17 | train, val = get_one_dataset(conf=config, dataset_name="oasst_export", **kwargs) 18 | assert len(train) > 9000 19 | assert len(val) > 2000 20 | -------------------------------------------------------------------------------- /model/model_training/utils/utils_rl.py: -------------------------------------------------------------------------------- 1 | import tritonclient.grpc as client_util 2 | from tritonclient.utils import np_to_triton_dtype 3 | 4 | 5 | def prepare_tensor(name: str, input): 6 | t = client_util.InferInput(name, input.shape, np_to_triton_dtype(input.dtype)) 7 | t.set_data_from_numpy(input) 8 | return t 9 | -------------------------------------------------------------------------------- /model/pretokenizer/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy>=1.22.4 2 | sentencepiece==0.1.99 3 | torch>=2.0.0 4 | tqdm==4.65.0 5 | transformers==4.31.0 6 | -------------------------------------------------------------------------------- /notebooks/README.md: -------------------------------------------------------------------------------- 1 | # Notebooks 2 | 3 | This directory is used to hold useful notebooks related to understanding how 4 | various parts of the project work. 5 | 6 | > Note for dataset contributions: The `notebooks` directory is being retired in 7 | > favour of new dataset contributions going to the `data/datasets` directory, 8 | > following the guidelines 9 | > [here](https://github.com/LAION-AI/Open-Assistant/blob/main/data/datasets/README.md). 10 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/README.md: -------------------------------------------------------------------------------- 1 | # Data Augmentation 2 | 3 | This folder contains subfolders of notebooks broadly relating to data 4 | augmentation. Each subfolder contains a README.md file explaining what the 5 | notebooks in that folder do. 6 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/essay-instructions/README.md: -------------------------------------------------------------------------------- 1 | # Essay Instructions 2 | 3 | Essay Instructions is a notebook that takes an essay as an input and generates 4 | instructions on how to generate that essay. This will be very useful for data 5 | collecting for the model 6 | 7 | ## Contributing 8 | 9 | Feel free to contribute to this notebook, it's nowhere near perfect but it's a 10 | good start. If you want to contribute finding a new model that better suits this 11 | task would be great. Huggingface has a lot of models that could help. 12 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/essay-revision/README.md: -------------------------------------------------------------------------------- 1 | # Essay Revision 2 | 3 | Essay Revision is a notebook that generates data for improving essays. It does 4 | that by taking a "good" essay, making it worse step by step and the finding 5 | instructions for making it better. This will be useful for generating data for 6 | the model. 7 | 8 | ## Contributing 9 | 10 | Feel free to contribute to this notebook. It's not perfect but it is quite good. 11 | Finding a better way to make grammatical errors may be a good place to start. 12 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/hippocorpus/README.md: -------------------------------------------------------------------------------- 1 | # Hippocorpus Converter 2 | 3 | This notebook takes an existing copy of the 4 | [Hippocorpus](https://huggingface.co/datasets/hippocorpus) and augments it for 5 | training OpenAssistant. **This notebook is currently unique among its peers in 6 | the same folder as it requires an existing copy of the Hippocorpus. See the 7 | above HuggingFace link for a download link.** 8 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/unified-qa/README.md: -------------------------------------------------------------------------------- 1 | # UnifiedQA Downloader 2 | 3 | UnifiedQA is a notebook that downloads data from UnifiedQA's Google Cloud bucket 4 | and converts it into OpenAssistant Data Scheme formats. Files for each dataset 5 | in the UnifiedQA collection (excluding the ones already in xP3) are saved to 6 | JSON. 7 | 8 | --- 9 | 10 | ## Contributing 11 | 12 | Feel free to contribute to this notebook. It's not perfect and additional 13 | functionality is planned. 14 | -------------------------------------------------------------------------------- /notebooks/data-augmentation/wikidata-qa/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy 2 | pandas 3 | requests 4 | tqdm 5 | -------------------------------------------------------------------------------- /notebooks/diverse/README.md: -------------------------------------------------------------------------------- 1 | # DIVERSE Downloader 2 | 3 | Diverse is a notebook that downloads the DIVERSE dataset and converts it into 4 | OpenAssistant Data Scheme formats. 5 | 6 | --- 7 | 8 | ## Contributing 9 | 10 | Feel free to contribute to this notebook. It's not perfect and additional 11 | functionality is planned. 12 | -------------------------------------------------------------------------------- /notebooks/example/data/data.csv: -------------------------------------------------------------------------------- 1 | row,text,label 2 | 1,some example data,1 3 | 2,some more data,0 4 | -------------------------------------------------------------------------------- /notebooks/example/requirements.txt: -------------------------------------------------------------------------------- 1 | transformers 2 | -------------------------------------------------------------------------------- /notebooks/openassistant-oasst1/README.md: -------------------------------------------------------------------------------- 1 | # Open Assistant - OASST1 Dataset Notebooks 2 | 3 | This repository contains some helper notebooks for playing around with the 4 | [Open Assistant - OASST1 Dataset](https://huggingface.co/datasets/OpenAssistant/oasst1) 5 | 6 | - [`getting-started.ipynb`](./getting-started.ipynb) - Getting started with the 7 | dataset. 8 | -------------------------------------------------------------------------------- /oasst-data/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "oasst_data" 3 | description = "Open Assistant Data Module" 4 | version = "1.0.0" 5 | authors = [ 6 | { name = "LAION-AI", email = "contact@laion.ai" } 7 | ] 8 | dependencies = [ 9 | "pydantic==1.10.7", 10 | "loguru==0.6.0", 11 | "datasets>=2.12.0" 12 | ] 13 | 14 | [project.optional-dependencies] 15 | dev = [ 16 | "pytest", 17 | ] 18 | 19 | [build-system] 20 | build-backend = "flit_core.buildapi" 21 | requires = ["flit_core >=3.2,<4"] 22 | -------------------------------------------------------------------------------- /oasst-shared/README.md: -------------------------------------------------------------------------------- 1 | # Shared Python code for Open Assistant 2 | 3 | Run `pip install -e .` to install the package in editable mode. 4 | -------------------------------------------------------------------------------- /oasst-shared/oasst_shared/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/oasst-shared/oasst_shared/__init__.py -------------------------------------------------------------------------------- /oasst-shared/oasst_shared/exceptions/__init__.py: -------------------------------------------------------------------------------- 1 | # Ignore unused imports; these are re-exported 2 | from .oasst_api_error import OasstError as OasstError # noqa: F401 3 | from .oasst_api_error import OasstErrorCode as OasstErrorCode # noqa: F401 4 | -------------------------------------------------------------------------------- /oasst-shared/oasst_shared/schemas/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/oasst-shared/oasst_shared/schemas/__init__.py -------------------------------------------------------------------------------- /oasst-shared/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "oasst_shared" 3 | description = "Open Assistant Shared Module" 4 | version = "1.0.0" 5 | authors = [ 6 | { name = "LAION-AI", email = "contact@laion.ai" } 7 | ] 8 | dependencies = [ 9 | "pydantic==1.10.7", 10 | "aiohttp==3.8.3", 11 | "aiohttp[speedups]", 12 | "loguru==0.6.0", 13 | "psutil==5.9.4", 14 | "pynvml==11.5.0" 15 | ] 16 | 17 | [project.optional-dependencies] 18 | dev = [ 19 | "pytest", 20 | "pytest-asyncio", 21 | ] 22 | 23 | [build-system] 24 | build-backend = "flit_core.buildapi" 25 | requires = ["flit_core >=3.2,<4"] 26 | -------------------------------------------------------------------------------- /oasst-shared/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/oasst-shared/tests/__init__.py -------------------------------------------------------------------------------- /redis.conf: -------------------------------------------------------------------------------- 1 | maxmemory 100mb 2 | maxmemory-policy allkeys-lru 3 | -------------------------------------------------------------------------------- /safety/README.md: -------------------------------------------------------------------------------- 1 | ![Translate](https://img.shields.io/badge/Translate-blue) 2 | 3 | # Open Assistant Safety Pipeline 4 | 5 | The Open Assistant inference stack includes a toggleable safety pipeline which 6 | can be used to mitigate harmful requests and outputs to and from the model. 7 | 8 | This directory was initially used for development of the safety pipeline, but it 9 | has now been migrated to a standalone repository called 10 | [blade2blade](https://github.com/LAION-AI/blade2blade). 11 | -------------------------------------------------------------------------------- /scripts/backend-development/start-docker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | docker compose -f "$parent_path/../../docker-compose.yaml" --profile backend-dev up --build --attach-dependencies 4 | -------------------------------------------------------------------------------- /scripts/backend-development/start-worker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | # switch to backend directory 5 | pushd "$parent_path/../../backend" 6 | 7 | celery -A oasst_backend.celery_worker worker -l INFO -B 8 | 9 | popd 10 | -------------------------------------------------------------------------------- /scripts/backend-development/stop-mock-server.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker stop oasst-mock-backend 4 | -------------------------------------------------------------------------------- /scripts/backend-development/stop-worker.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | # switch to backend directory 5 | pushd "$parent_path/../../backend" 6 | 7 | celery -A oasst_backend.celery_worker control shutdown 8 | 9 | popd 10 | -------------------------------------------------------------------------------- /scripts/data-collection/twitter/requirements.txt: -------------------------------------------------------------------------------- 1 | numpy==1.21.5 2 | polars==0.15.14 3 | tqdm==4.64.0 4 | -------------------------------------------------------------------------------- /scripts/frontend-development/README.md: -------------------------------------------------------------------------------- 1 | # Frontend Development Setup 2 | 3 | In root directory run 4 | `docker compose up frontend-dev --build --attach-dependencies` to start a 5 | database and the backend server. 6 | 7 | Then, point your frontend at `http://localhost:8080` to start developing. During 8 | development, any API key will be accepted. 9 | -------------------------------------------------------------------------------- /scripts/frontend-development/run-bot-local.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | # switch to bot directory 5 | pushd "$parent_path/../../discord-bot" 6 | 7 | python3 -m bot 8 | 9 | popd 10 | -------------------------------------------------------------------------------- /scripts/frontend-development/run-contract-test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | # switch to website directory 5 | pushd "$parent_path/../../website" 6 | 7 | set -xe 8 | 9 | npm run cypress:run:contract 10 | 11 | popd 12 | -------------------------------------------------------------------------------- /scripts/oasst-shared-development/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) 3 | 4 | # switch to backend directory 5 | pushd "$parent_path/../../oasst-shared" 6 | 7 | set -xe 8 | 9 | pytest . 10 | 11 | popd 12 | -------------------------------------------------------------------------------- /text-frontend/requirements.txt: -------------------------------------------------------------------------------- 1 | faker==16.6.1 2 | requests==2.28.1 3 | typer==0.7.0 4 | -------------------------------------------------------------------------------- /website/.nvmrc: -------------------------------------------------------------------------------- 1 | 16.17.0 2 | -------------------------------------------------------------------------------- /website/.prettierignore: -------------------------------------------------------------------------------- 1 | .eslintrc.json 2 | tailwind.config.js 3 | .storybook/* 4 | public/mockServiceWorker.js 5 | -------------------------------------------------------------------------------- /website/.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "printWidth": 120, 4 | "overrides": [ 5 | { 6 | "files": "*.css", 7 | "options": { 8 | "tabWidth": 4 9 | } 10 | } 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /website/.storybook/decorators.js: -------------------------------------------------------------------------------- 1 | import { RouterContext } from "next/dist/shared/lib/router-context"; 2 | import { SessionProvider } from "next-auth/react"; 3 | import { createMockRouter } from 'src/test-utils/createMockRouter' 4 | 5 | export const SessionDecorator = (Story) => ( 6 | 7 | 8 | 9 | ) 10 | export const RouterDecorator = (Story) => { 11 | const router = createMockRouter() 12 | return ( 13 | 14 | 15 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /website/cypress-visual-screenshots/baseline/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/cypress-visual-screenshots/baseline/.gitkeep -------------------------------------------------------------------------------- /website/cypress.config.contract.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "cypress"; 2 | 3 | export default defineConfig({ 4 | e2e: { 5 | // No baseUrl here, because we don't need it for contract testing 6 | baseUrl: null, 7 | specPattern: "cypress/contract/*.cy.{ts,js}", 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /website/cypress/components/Container.cy.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { Container } from "src/components/Container"; 3 | 4 | describe("", () => { 5 | it("renders", () => { 6 | // see: https://on.cypress.io/mounting-react 7 | const className = "my-class"; 8 | const text = "test_container"; 9 | cy.mount({text}); 10 | cy.get(`div.${className}`).should("have.class", className).should("be.visible").should("contain", text); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /website/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /website/cypress/support/component-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Components App 8 | 9 |
10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /website/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress", "node"], 6 | "baseUrl": "..", 7 | "allowSyntheticDefaultImports": true, 8 | "esModuleInterop": true, 9 | "jsx": "react-jsx" 10 | }, 11 | 12 | "include": ["**/*.ts", "**/*.tsx"] 13 | } 14 | -------------------------------------------------------------------------------- /website/next-lint.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | const { spawnSync } = require("child_process"); 3 | async function npmLint() { 4 | const spawnOption = { 5 | shell: true, 6 | env: process.env, 7 | stdio: "inherit", 8 | cwd: "./website", 9 | }; 10 | let npmInstall; 11 | let npmRunLint; 12 | try { 13 | npmInstall = await spawnSync("npm", ["install"], spawnOption); 14 | if (npmInstall.status !== 0) { 15 | process.exit(npmInstall.status); 16 | } 17 | npmRunLint = await spawnSync("npm", ["run lint"], spawnOption); 18 | process.exit(npmRunLint.status); 19 | } catch (error) { 20 | console.error(error); 21 | process.exit(1); 22 | } 23 | } 24 | npmLint(); 25 | -------------------------------------------------------------------------------- /website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /website/prisma/migrations/20230805220637_paperack/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "paperackName" TEXT NOT NULL DEFAULT '', 3 | ADD COLUMN "paperackYes" BOOLEAN NOT NULL DEFAULT false; 4 | -------------------------------------------------------------------------------- /website/prisma/migrations/migration_lock.toml: -------------------------------------------------------------------------------- 1 | # Please do not edit this file manually 2 | # It should be added in your version-control system (i.e. Git) 3 | provider = "postgresql" 4 | -------------------------------------------------------------------------------- /website/public/fonts/lexend.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/fonts/lexend.woff2 -------------------------------------------------------------------------------- /website/public/images/logos/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/logos/favicon.png -------------------------------------------------------------------------------- /website/public/images/logos/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/logos/logo.png -------------------------------------------------------------------------------- /website/public/images/logos/logo_192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/logos/logo_192x192.png -------------------------------------------------------------------------------- /website/public/images/logos/logo_mono.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/logos/logo_mono.png -------------------------------------------------------------------------------- /website/public/images/logos/redmond_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/logos/redmond_logo.jpg -------------------------------------------------------------------------------- /website/public/images/temp-avatars/av1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/temp-avatars/av1.jpg -------------------------------------------------------------------------------- /website/public/images/temp-avatars/av2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/temp-avatars/av2.jpg -------------------------------------------------------------------------------- /website/public/images/temp-avatars/av3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/temp-avatars/av3.jpg -------------------------------------------------------------------------------- /website/public/images/temp-avatars/av4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/temp-avatars/av4.jpg -------------------------------------------------------------------------------- /website/public/images/temp-avatars/av5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LAION-AI/Open-Assistant/f1e6ed9526f5817531f3ab85441a40b3671ddccb/website/public/images/temp-avatars/av5.jpg -------------------------------------------------------------------------------- /website/public/locales/ar/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "استلم مهمَّةً!", 3 | "create": "أنشئ", 4 | "evaluate": "قيِّم", 5 | "label": "عَنوِن", 6 | "dashboard": "لوحة المعلومات", 7 | "go": "اذهب", 8 | "welcome_message": { 9 | "label": "أهلًا يا {{username}}!", 10 | "contributor": "مساهم", 11 | "description": "المساعد الحرُّ هو برنامج ذكاء اصطناعيٍّ مفتوح المصدر يستخدم ويدرِّب نماذج لغات متقدِّمة ليفهم ويحادث البشر", 12 | "instruction": "أنجز مهامًا لتدرِّب النموذج وتحصد النقاط." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/ar/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "شروط خدمة المساعد الحرِّ", 3 | "content": "عليك قبول شروط خدمتنا لتستمرَّ في استخدام المساعد الحرِّ (Open Assistant)", 4 | "accept": "أقبل", 5 | "decline": "أرفض" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/bar/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "Mein Konto leschn", 3 | "delete_account_data": "Deina gonzn Daten do wohe mitkolfn hosch (Aufgobn lösn, Ontwortn inordn und olla deina Chat-foläufe mitn Chat Service) wern augikoltn obo dein Nume wert anonymisiert.", 4 | "delete_account_intro": "Wenne dein Konto lesch passiert dess:", 5 | "delete_account_leaderboard": "Di Konto fo gileschta Benutza wert man nimma in do Beschtnlischte sechn", 6 | "delete_account_permanent": "Dei Aktion isch fi ollm und konn et zruggsetzt wearn", 7 | "go_to_dashboard": "Zrugg zinn Dashboard", 8 | "yes_delete": "Jo, mein Konto fi ollm leschn" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/bar/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Wähl an Aufgoube aus!", 3 | "create": "Erschtell", 4 | "evaluate": "Bewertn", 5 | "label": "Label", 6 | "dashboard": "Dashboard", 7 | "go": "Lous", 8 | "welcome_message": { 9 | "label": "Hoila griaste {{username}}!", 10 | "contributor": "Mitorbata", 11 | "description": "Do Open Assistant isch a open-source KI-Assistent dosse wos Language Models nimmp und trainiert, sodassa alla Leit foschteat unt mit ihnan reydn konn.", 12 | "instruction": "Moch a poor Aufgoubn und fodian a poor Punkte." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/bar/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Unnemm (Jo)", 3 | "content": "Dasse Open Assistant weita hernemm konnsch musche erschto insra Nutzungsbedingungn unnemm.", 4 | "decline": "Et Unnemm (Na)", 5 | "title": "Nutzungsbedingungn fi Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/bg/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Създаване", 3 | "dashboard": "Табло", 4 | "evaluate": "Оценете", 5 | "go": "Старт", 6 | "grab_a_task": "Хванете една задача!", 7 | "label": "Етикет", 8 | "welcome_message": { 9 | "label": "Добре дошъл, {{username}}!", 10 | "contributor": "Потребител", 11 | "description": "Open Assistant е отворен AI асистент, който използва и обучава напреднали езикови модели, за да разбира и отговаря на хора.", 12 | "instruction": "Изпълнявайте задачи, за да помогнете за обучението на модела и да спечелите точки." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/bg/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Приемам", 3 | "content": "За да продължите да използвате Open Assistant, трябва първо да приемете нашите условия за ползване.", 4 | "decline": "Отхвърлям", 5 | "title": "Условия за ползване на Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ca/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Agafa una tasca!", 3 | "create": "Crea", 4 | "evaluate": "Avalua", 5 | "label": "Etiqueta", 6 | "dashboard": "Panell principal", 7 | "go": "Ves" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/ca/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Accepta", 3 | "content": "Per a continuar utilitzant Open Assistant, primer has d'acceptar les Condicions del servei.", 4 | "decline": "Rebutja", 5 | "title": "Condicions del servei d'Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/cs/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Vyberte si úlohu!", 3 | "create": "Vytvořit", 4 | "evaluate": "Vyhodnotit", 5 | "label": "Označkovat", 6 | "dashboard": "Nástěnka", 7 | "go": "Vybrat", 8 | "welcome_message": { 9 | "label": "Vítej, {{username}}!", 10 | "contributor": "Přispěvatel", 11 | "description": "Open Assistant je open-source AI asistent, který používá a trénuje pokročilé jazykové modely, aby lidem rozuměl lidem a dokázal na ně reagovat.", 12 | "instruction": "Plňte úkoly, které pomáhají trénovat model a získávejte body." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/cs/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Smluvní podmínky služby Open Assistant", 3 | "content": "Chcete-li nadále používat Open Assistant, musíte nejprve přijmout naše Smluvní podmínky.", 4 | "accept": "Přijmout", 5 | "decline": "Odmítnout" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/da/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Tag en opgave!", 3 | "create": "Lav", 4 | "evaluate": "Evaluer", 5 | "label": "Label", 6 | "dashboard": "Dashboard", 7 | "go": "Start" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/da/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Servicebetingelser for Open Assistant", 3 | "content": "For fortsat at bruge Open Assistant, skal du acceptere servicebetingelserne.", 4 | "accept": "Accepter", 5 | "decline": "Afslå" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/de/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Schnappen Sie sich eine Aufgabe!", 3 | "create": "Erstellen", 4 | "evaluate": "Auswerten", 5 | "label": "Labeln", 6 | "dashboard": "Dashboard", 7 | "go": "Los", 8 | "welcome_message": { 9 | "label": "Willkommen, {{username}}!", 10 | "contributor": "Contributor", 11 | "description": "Open Assistant ist ein open-source KI-Assistent welcher fortgeschrittene Language Models nutzt und trainiert, um Menschen zu verstehen und ihnen zu antworten.", 12 | "instruction": "Schließe Aufgaben ab um mit dem Training zu helfen und Punkte zu verdienen." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/de/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Akzeptieren", 3 | "content": "Um Open Assistant weiterhin nutzen zu können, müssen Sie zunächst unsere Nutzungsbedingungen akzeptieren.", 4 | "decline": "Ablehnen", 5 | "title": "Nutzungsbedingungen für Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/el/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Αναλάβετε μια εργασία!", 3 | "create": "Δημιουργία", 4 | "evaluate": "Αξιολόγηση", 5 | "label": "Σήμανση", 6 | "dashboard": "Ταμπλό", 7 | "go": "Πήγαινε", 8 | "welcome_message": { 9 | "label": "Καλώς ήρθες, {{username}}!", 10 | "contributor": "Συνεισφέρων", 11 | "description": "Το Open Assistant είναι ένας βοηθός τεχνητής νοημοσύνης ανοιχτού κώδικα που χρησιμοποιεί και εκπαιδεύει προηγμένα γλωσσικά μοντέλα για να κατανοεί και να ανταποκρίνεται στους ανθρώπους", 12 | "instruction": "Ολοκληρώστε εργασίες για να βοηθήσετε στην εκπαίδευση του μοντέλου και να κερδίσετε πόντους." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/el/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Όροι Χρήσης του Open Assistant", 3 | "content": "Για να συνεχίσετε να χρησιμοποιείτε το Open Assistant, θα πρέπει να έχετε αποδεχθεί τους όρους χρήσης.", 4 | "accept": "Αποδοχή", 5 | "decline": "Απόρριψη" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/en/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Help with data collection", 3 | "create": "Create", 4 | "evaluate": "Evaluate", 5 | "label": "Label", 6 | "dashboard": "Dashboard", 7 | "go": "Go", 8 | "welcome_message": { 9 | "label": "Welcome, {{username}}!", 10 | "contributor": "Contributor", 11 | "description": "Open Assistant is an open-source AI assistant that uses and trains advanced language models to understand and respond to humans.", 12 | "instruction": "Complete tasks to help train the model and earn points." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/en/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Accept", 3 | "content": "To continue using Open Assistant, you have to accept our Terms of Service first.", 4 | "decline": "Decline", 5 | "title": "Terms of Service for Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/eo/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "back_to_chat_list": "Reen al babila listo", 3 | "chat_date": "{{val, datetime}}", 4 | "config_title": "Babila agordo", 5 | "empty": "(malplena)", 6 | "login_message": "Por uzi ĉi tiun funkcion, vi devas ensaluti denove. Ensalutu per unu el ĉi tiuj provizantoj:", 7 | "model": "Modelo", 8 | "preset": "Antaŭagordo", 9 | "preset_custom": "Propra", 10 | "queue_info": "Via mesaĝo estas en atendovico, vi estas en pozicio {{ queuePosition, number, integer }} en la vico.", 11 | "you_are_logged_in": "Vi estas ensalutinta al la babila servo", 12 | "your_chats": "Viaj babiladoj" 13 | } 14 | -------------------------------------------------------------------------------- /website/public/locales/eo/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Kapu taskon!", 3 | "create": "Krei", 4 | "evaluate": "Taksi", 5 | "label": "Etikedo", 6 | "dashboard": "Stirpanelo", 7 | "go": "Ek", 8 | "welcome_message": { 9 | "label": "Bonvenon, {{username}}!", 10 | "contributor": "Kontribuanto", 11 | "description": "Open Assistant estas malfermitkoda AI-asistanto, kiu uzas kaj trejnas altnivelajn lingvajn modelojn por kompreni kaj respondi al homoj.", 12 | "instruction": "Plenumu taskojn por helpi trejni la modelon kaj akiri poentojn." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/eo/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Kondiĉoj de Servo por Open Assistant", 3 | "content": "Por daŭrigi la uzadon de Open Assistant, vi devas unue akcepti niajn Kondiĉojn de Servo.", 4 | "accept": "Akcepti", 5 | "decline": "Malakcepti" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/es/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Crear", 3 | "dashboard": "Panel principal", 4 | "evaluate": "Evaluar", 5 | "go": "Ir", 6 | "grab_a_task": "Ayuda con la recolección de datos", 7 | "label": "Etiquetar", 8 | "welcome_message": { 9 | "label": "Bienvenido, {{username}}!", 10 | "contributor": "Colaborador", 11 | "description": "Open Assistant es un asistente de Inteligencia Artificial de código abierto que utiliza y entrena modelos de lenguaje avanzados para entender y responder a los humanos.", 12 | "instruction": "Completa tareas para ayudar a entrenar el modelo y ganar puntos." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/es/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Aceptar", 3 | "content": "Para continuar usando Open Assistant, tienes que aceptar nuestros Términos de Servicio primero.", 4 | "decline": "Rechazar", 5 | "title": "Términos de Servicio para Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/eu/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Sortu", 3 | "dashboard": "Aginte-panela", 4 | "evaluate": "Ebaluatu", 5 | "go": "Joan", 6 | "grab_a_task": "Hartu zeregin bat!", 7 | "label": "Etiketatu", 8 | "welcome_message": { 9 | "label": "Ongi etorri, {{erabiltzaile izena}}!", 10 | "contributor": "Kolaboratzailea", 11 | "description": "Open Assistant kode irekiko Adimen Artifizialdun laguntzailea da, hizkuntza-eredu aurreratuak erabiltzen eta entrenatzen dituena gizakiak ulertzeko eta haiei erantzuteko.", 12 | "instruction": "Zereginak bete eredua entrenatzen laguntzeko eta puntuak irabazteko." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/eu/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Onartu", 3 | "content": "Open Assistant erabiltzen jarraitzeko, gure zerbitzu-baldintzak onartu behar dituzu lehenik.", 4 | "decline": "Ukatu", 5 | "title": "Open Assistant-en zerbitzu-baldintzak" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/fa/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "انجام یک کار!", 3 | "create": "ساخت", 4 | "evaluate": "ارزیابی", 5 | "label": "برچسب", 6 | "dashboard": "داشبورد", 7 | "go": "برو" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/fa/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "شرایط خدمات برای دستیار باز", 3 | "content": "برای ادامه استفاده از دستیار باز ابتدا باید شرایط خدمات ما را بپذیرید.", 4 | "accept": "قبول", 5 | "decline": "رد" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/fi/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Valitse tehtävä!", 3 | "create": "Luo", 4 | "evaluate": "Arvostele", 5 | "label": "Arvioi", 6 | "dashboard": "Etusivu", 7 | "go": "Aloita", 8 | "welcome_message": { 9 | "label": "Tervetuloa, {{username}}!", 10 | "contributor": "Osallistuja", 11 | "description": "Open Assistant on avoimen lähdekoodin tekoälyassistentti, joka käyttää ja kouluttaa kehittyneitä kielimalleja ymmärtääkseen ja vastatakseen ihmisille.", 12 | "instruction": "Suorita tehtäviä kouluttaaksesi kielimallia ja ansaitaksesi pisteitä." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/fi/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Open Assistantin käyttöehdot", 3 | "content": "Jatkaaksesi Open Assistantin käyttöä, sinun tulee hyväksyä käyttöehtomme.", 4 | "accept": "Hyväksy", 5 | "decline": "Älä hyväksy" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/fr/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "back_to_chat_list": "Retour à la liste de discussion", 3 | "your_chats": "Vos discussions" 4 | } 5 | -------------------------------------------------------------------------------- /website/public/locales/fr/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Créer", 3 | "dashboard": "Tableau de bord", 4 | "evaluate": "Évaluer", 5 | "go": "Aller", 6 | "grab_a_task": "Attrape une tâche!", 7 | "label": "Étiquette", 8 | "welcome_message": { 9 | "label": "Bienvenue, {{username}}!", 10 | "contributor": "Contributeur", 11 | "description": "Open Assistant est un assistant IA open-source qui utilise et forme des modèles linguistiques avancés pour comprendre et répondre à des humains.", 12 | "instruction": "Complétez des tâches pour aider à entrainer le modèle et gagnez des points." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/fr/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Accepter", 3 | "content": "Pour continuer à utiliser Open Assistant, vous devez d'abord accepter nos conditions d'utilisation.", 4 | "decline": "Refuser", 5 | "title": "Conditions d'utilisation d'Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/gl/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Colle unha tarefa!", 3 | "create": "Crear", 4 | "evaluate": "Avaliar", 5 | "label": "Etiqueta", 6 | "dashboard": "Panel", 7 | "go": "Ir" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/gl/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Termos de Servicio para Open Assistant", 3 | "content": "Para continuar usando Open Assistant, tes que aceptar os nosos Termos de Servicio primeiro.", 4 | "accept": "Aceptar", 5 | "decline": "Rexeitar" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/he/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "תפוס משימה!", 3 | "create": "צור", 4 | "evaluate": "הערך", 5 | "label": "תווית", 6 | "dashboard": "לוח מחוונים", 7 | "go": "עבור", 8 | "welcome_message": { 9 | "label": "(ה)ברוך(ה) הבא, {{username}}!", 10 | "contributor": "תורם", 11 | "description": "Open Assistant הוא עוזר בינה מלאכותית בקוד פתוח שמשתמש במודלים מתקדמים של שפה ומכשירה אותם כדי להבין ולהגיב לבני אדם.", 12 | "instruction": "השלם משימות כדי לעזור לאמן את המודל ולצבור נקודות." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/he/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "תנאים והגבלות עבור Open Assistant", 3 | "content": "כדי להמשיך להשתמש ב-Open Assistant, תחילה עליך לאשר את תנאי השירות שלנו.", 4 | "accept": "קבל", 5 | "decline": "דחה" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/hi/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "एक कार्य पकड़ो!", 3 | "create": "बनाएं", 4 | "evaluate": "मूल्यांकन करना", 5 | "label": "लेबल", 6 | "dashboard": "डैशबोर्ड", 7 | "go": "जाओ", 8 | "welcome_message": { 9 | "label": "स्वागत है, {{username}}!", 10 | "contributor": "सहयोगी", 11 | "description": "ओपन असिस्टेंट एक ओपन-सोर्स एआई असिस्टेंट है जो इंसानों को समझने और प्रतिक्रिया देने के लिए उन्नत भाषा मॉडल का उपयोग करता है और उन्हें प्रशिक्षित करता है।", 12 | "instruction": "मॉडल को प्रशिक्षित करने और अंक अर्जित करने में सहायता के लिए कार्यों को पूरा करें।" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/hi/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Open Assistant के लिए सेवा की शर्तें", 3 | "content": "Open Assistant का उपयोग जारी रखने के लिए, आपको पहले हमारी सेवा की शर्तों को स्वीकार करना होगा।", 4 | "accept": "स्वीकार करें", 5 | "decline": "अस्वीकार करें" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/hu/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Válassz egy feladatot!", 3 | "create": "Létrehozás", 4 | "evaluate": "Értékelés", 5 | "label": "Címkézés", 6 | "dashboard": "Irányítópult", 7 | "go": "Ugrás", 8 | "welcome_message": { 9 | "label": "Szia {{username}}!", 10 | "contributor": "Közreműködő", 11 | "description": "Az Open Assistant egy nyílt forráskódú MI, amely fejlett nyelvi modelleket használ és épít fel, hogy megértse az embereket és válaszoljon nekik.", 12 | "instruction": "Végezz el feladatokat, és segíts a modell betanításában, hogy pontokat kapj." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/hu/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Az Open Assistant szolgáltatási feltételei", 3 | "content": "Az Open Assistant használatának folytatásához előbb el kell fogadnod a szolgáltatási feltételeinket.", 4 | "accept": "Elfogadás", 5 | "decline": "Elutasítás" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/id/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Ambil tugas!", 3 | "create": "Buat", 4 | "evaluate": "Evaluasi", 5 | "label": "Label", 6 | "dashboard": "Dasbor", 7 | "go": "Mulai" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/id/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Syarat dan Ketentuan Penggunaan Open Assistant", 3 | "content": "Untuk melanjutkan menggunakan Open Assistant, anda harus menerima Syarat dan Ketentuan Penggunaan terlebih dahulu.", 4 | "accept": "Terima", 5 | "decline": "Tolak" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/it/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Crea", 3 | "dashboard": "Pannello di controllo", 4 | "evaluate": "Valuta", 5 | "go": "Vai", 6 | "grab_a_task": "Scegli un compito!", 7 | "label": "Etichetta" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/it/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Giornaliera", 3 | "label": "Etichette", 4 | "last_updated_at": "Ultimo aggiornamento: {{val, datetime}}", 5 | "leaderboard": "Classifica", 6 | "monthly": "Mensile", 7 | "next": "Successivo", 8 | "overall": "Complessivo", 9 | "previous": "Precedente", 10 | "prompt": "Richieste", 11 | "rank": "Posizione", 12 | "reply": "Risposte", 13 | "score": "Punteggio", 14 | "top_5_contributors_today": "I cinque maggiori contribuenti di oggi", 15 | "user": "Utente", 16 | "view_all": "Vedi tutto", 17 | "weekly": "Settimanale" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/it/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Accetta", 3 | "content": "Per continuare ad usare Open Assistant, accettai i nostri Termini di Servizio.", 4 | "decline": "Rifiuta", 5 | "title": "Termini di Servizio per Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ja/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "アカウントを削除する", 3 | "delete_account_data": "Open Assistantによって解決されたタスク、メッセージのランキング、およびチャットサービスを使用して行われたすべての会話に貢献したデータは保持されます。ただし、元のユーザーに関するすべての参照は匿名化されます。", 4 | "delete_account_intro": "アカウントの削除には、以下のことが含まれます:", 5 | "delete_account_leaderboard": "削除されたユーザーのアカウントは、リーダーボードに表示されません", 6 | "delete_account_permanent": "この動作は永続的であり、元に戻すことはできません", 7 | "go_to_dashboard": "ダッシュボードに戻る", 8 | "yes_delete": "はい、私のアカウントを永久に削除してください" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/ja/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "タスクをどうぞ!", 3 | "create": "作成する", 4 | "evaluate": "評価する", 5 | "label": "ラベリング", 6 | "dashboard": "ダッシュボード", 7 | "go": "やる", 8 | "welcome_message": { 9 | "label": "ようこそ、{{username}}さん!", 10 | "contributor": "貢献者", 11 | "description": "Open Assistantは、人間を理解し、応答する、高度な言語モデルを使用・育成する、オープンソースのAIアシスタントです。", 12 | "instruction": "タスクをこなして、モデルを育て、ポイントを稼ぎましょう。" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/ja/error.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": "何かがおかしいです!", 3 | "err_1000": "無効なタスクタイプ", 4 | "err_1001": "タスクの確認に失敗しました", 5 | "err_1002": "タスクの未確認に失敗しました", 6 | "err_1003": "無効な応答タイプ", 7 | "err_1004": "インタラクション要求に失敗しました", 8 | "err_1005": "タスクの生成に失敗しました", 9 | "err_1006": "{{task_type}}タイプのタスクは現在利用できません。", 10 | "err_1007": "タスクの可用性クエリに失敗しました", 11 | "err_1008": "メッセージサイズが長すぎます", 12 | "err_1009": "最近のメッセージに重複があります", 13 | "err_1010": "メッセージテキストが空です", 14 | "err_1011": "同じメッセージに2回返信することはできません", 15 | "err_1012": "保留中のタスクが多すぎます。数分後にもう一度お試しください。" 16 | } 17 | -------------------------------------------------------------------------------- /website/public/locales/ja/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "同意する", 3 | "content": "Open Assistantを引き続き使われる場合、先に利用規約に同意してください。", 4 | "decline": "拒否する", 5 | "title": "Open Assistant利用規約" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ko/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "만들다", 3 | "dashboard": "대시보드", 4 | "evaluate": "평가하다", 5 | "go": "시작", 6 | "grab_a_task": "작업을 선택하세요!", 7 | "label": "레이블" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/ko/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "일일", 3 | "label": "레이블", 4 | "last_updated_at": "최종 업데이트 시간: {{val, datetime}}", 5 | "leaderboard": "리더보드", 6 | "monthly": "월간", 7 | "next": "다음", 8 | "overall": "종합", 9 | "previous": "이전", 10 | "prompt": "프롬프트", 11 | "rank": "순위", 12 | "reply": "답변", 13 | "score": "점수", 14 | "top_5_contributors_today": "금일 상위 5명의 기여자", 15 | "user": "사용자", 16 | "view_all": "전체보기", 17 | "weekly": "주간" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/ko/message.json: -------------------------------------------------------------------------------- 1 | { 2 | "copy_message_id": "Copy message ID", 3 | "label_action": "레이블", 4 | "label_title": "레이블", 5 | "message": "메세지", 6 | "message_deleted": "Message deleted", 7 | "open_new_tab_action": "새 탭에서 열기", 8 | "parent": "상위", 9 | "reactions": "반응", 10 | "recent_messages": "최근 메세지", 11 | "report_action": "리포트", 12 | "report_placeholder": "이 메시지를 검토해야 하는 이유는 무엇입니까?", 13 | "report_title": "리포트", 14 | "send_report": "보내기", 15 | "stop_tree": "Stop tree", 16 | "submit_labels": "등록", 17 | "tree_stopped": "Tree stopped {{id}}", 18 | "view_user": "사용자 보기", 19 | "your_recent_messages": "최근 메세지들" 20 | } 21 | -------------------------------------------------------------------------------- /website/public/locales/ko/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Accept", 3 | "content": "To continue using Open Assistant, you have to accept our Terms of Service first.", 4 | "decline": "Decline", 5 | "title": "Terms of Service for Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/lt/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "Pašalinti mano paskyrą", 3 | "delete_account_data": "Visi duomenys, kuriais prisidedate prie Open Assistant, spręsdami užduotis, reitinguodami žinutes, bei visi pokalbiai, sukurti naudojantis susirašinėjimo paslauga, bus išsaugoti. Visa informacija apie naudotoją yra anonimizuota.", 4 | "delete_account_intro": "Paskyros ištrynimas reiškia:", 5 | "delete_account_leaderboard": "Pašalintos naudotojų paskyros nebus rodomos lyderių lentelėse", 6 | "delete_account_permanent": "Šis veiksmas yra negrįžtamas", 7 | "go_to_dashboard": "Grįžti į apžvalgą", 8 | "yes_delete": "Taip, ištrinkite mano paskyrą visam laikui" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/lt/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Pasirinkite užuotį", 3 | "create": "Sukurti", 4 | "evaluate": "Įvertinti", 5 | "label": "Anotacija", 6 | "dashboard": "Apžvalga", 7 | "go": "Pirmyn", 8 | "welcome_message": { 9 | "label": "Sveiki, {{username}}!", 10 | "contributor": "Dalyvis", 11 | "description": "Open Assistant yra atviro kodo DI asistentas, kuris yra paremtas ir apmokytas naudojant pažangius kalbos modelius, siekiant apdoroti informaciją ir atsakyti žmonėms.", 12 | "instruction": "Atlikite užduotis, kad padėtumėte apmokyti modelį ir užsidirbtumėte taškų." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/lt/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Sutikti", 3 | "content": "Norėdami tęsti naudojimąsi Open Assistant, pirmiausia turite sutikti su mūsų naudojimosi taisyklėmis.", 4 | "decline": "Atmesti", 5 | "title": "Open Assistant naudojimosi taisyklės" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ms/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Bantuan pengumpulan data", 3 | "create": "Mencipta", 4 | "evaluate": "Menilai", 5 | "label": "Label", 6 | "dashboard": "Papan Pemuka", 7 | "go": "Pergi", 8 | "welcome_message": { 9 | "label": "Selamat datang, {{username}}!", 10 | "contributor": "Penyumbang", 11 | "description": "Open Assistant ialah assistant AI sumber terbuka yang menggunakan dan melatih model bahasa lanjutan untuk memahami dan bertindak balas kepada manusia.", 12 | "instruction": "Selesaikan tugas untuk membantu melatih model dan mendapatkan mata." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/ms/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Menerima", 3 | "content": "Untuk terus menggunakan Open Assistant, anda perlu menerima Syarat Perkhidmatan kami terlebih dahulu.", 4 | "decline": "Menolak", 5 | "title": "Terma dan Syarat Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/nb-NO/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Ta en oppgave!", 3 | "create": "Opprett", 4 | "evaluate": "Vurder", 5 | "label": "Betegnelse", 6 | "dashboard": "Dashbord", 7 | "go": "Kjør", 8 | "welcome_message": { 9 | "label": "Velkommen, {{username}}!", 10 | "contributor": "Bidragsyter", 11 | "description": "Open Assistant er en åpen kildekode AI-assistent som bruker og trener avanserte språkmodeller til å forstå og besvare mennesker.", 12 | "instruction": "Fullfør oppgaver for å hjelpe med å trene modellen og for å oppnå poeng." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/nb-NO/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Brukervilkår for Open Assistant", 3 | "content": "For å fortsette å bruke Open Assistant, må du først akseptere våre brukervilkår.", 4 | "accept": "Godta", 5 | "decline": "Avslå" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/nl/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Creëren", 3 | "dashboard": "Dashboard", 4 | "evaluate": "Beoordelen", 5 | "go": "Gaan", 6 | "grab_a_task": "Pak een taak!", 7 | "label": "Label" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/nl/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Servicevoorwaarden voor Open Assistant", 3 | "content": "Om Open Assistant te blijven gebruiken, moet je eerst onze Servicevoorwaarden accepteren.", 4 | "accept": "Aanvaarden", 5 | "decline": "Afwijzen" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/pl/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Wybierz zadanie!", 3 | "create": "Stwórz", 4 | "evaluate": "Oceń", 5 | "label": "Sklasyfikuj", 6 | "dashboard": "Panel", 7 | "go": "Przejdź" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/pl/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Dzienny", 3 | "label": "Etykiety", 4 | "last_updated_at": "Ostatnia aktualizacja: {{val, datetime}}", 5 | "leaderboard": "Ranking", 6 | "monthly": "Miesięczny", 7 | "next": "Następna", 8 | "overall": "Ogólny", 9 | "previous": "Poprzednia", 10 | "prompt": "Polecenia", 11 | "rank": "Pozycja", 12 | "reply": "Odpowiedzi", 13 | "score": "Wynik", 14 | "top_5_contributors_today": "Top 5 Dzisiejszych Uczestników", 15 | "user": "Użytkownik", 16 | "view_all": "Wyświetl wszystkich", 17 | "weekly": "Tygodniowy" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/pl/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Warunki świadczenia usług przez Open Assistant", 3 | "content": "Aby móc korzystać z Open Assistant, musisz najpierw zaakceptować nasze warunki świadczenia usług.", 4 | "accept": "Akceptuj", 5 | "decline": "Odrzuć" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/pt-BR/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Criar", 3 | "dashboard": "Painel", 4 | "evaluate": "Avaliar", 5 | "go": "Iniciar", 6 | "grab_a_task": "Escolha uma tarefa!", 7 | "label": "Classificar" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/pt-BR/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Diário", 3 | "label": "Etiquetas", 4 | "last_updated_at": "Última atualização em: {{val, datetime}}", 5 | "leaderboard": "Leaderboard", 6 | "monthly": "Mensal", 7 | "next": "Seguinte", 8 | "overall": "Geral", 9 | "previous": "Voltar", 10 | "prompt": "Prompts", 11 | "rank": "Classificação", 12 | "reply": "Respostas", 13 | "score": "Pontuação", 14 | "top_5_contributors_today": "Top 5 Colaboradores de Hoje", 15 | "user": "Usuário", 16 | "view_all": "Ver tudo", 17 | "weekly": "Semanal" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/pt-BR/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Aceitar", 3 | "content": "Para continuar usando o Open Assistant, você precisa aceitar os nossos Termos de Serviço primeiro.", 4 | "decline": "Recusar", 5 | "title": "Termos de Serviço para o Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ro/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Luați o sarcină!", 3 | "create": "Crea", 4 | "evaluate": "A evalua", 5 | "label": "Eticheta", 6 | "dashboard": "Panou de control", 7 | "go": "Merge" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/ro/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Zilnic", 3 | "label": "Etichete", 4 | "last_updated_at": "Ultima actualizare la: {{val, datetime}}", 5 | "leaderboard": "Clasament", 6 | "monthly": "Lunar", 7 | "next": "Următorul", 8 | "overall": "Per total", 9 | "previous": "Anterior", 10 | "prompt": "Prompts", 11 | "rank": "Rang", 12 | "reply": "Răspunsuri", 13 | "score": "Scor", 14 | "top_5_contributors_today": "Top 5 colaboratori astăzi", 15 | "user": "User", 16 | "view_all": "A vedea tot", 17 | "weekly": "Săptămânal" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/ro/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Termeni și condiții pentru Open Assistant", 3 | "content": "Pentru a continua să utilizați Open Assistant, trebuie să acceptați mai întâi Termenii și condițiile noastre.", 4 | "accept": "Accept", 5 | "decline": "Declin" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/ru/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Создать", 3 | "dashboard": "Главная", 4 | "evaluate": "Ранжировать", 5 | "go": "Начать", 6 | "grab_a_task": "Помочь со сбором данных", 7 | "label": "Классифицировать", 8 | "welcome_message": { 9 | "label": "Приветствуем, {{username}}!", 10 | "contributor": "Пользователь", 11 | "description": "Open Assistant - это Ассистент на базе ИИ с открытым исходным кодом, который использует и обучает продвинутые языковые модели, чтобы понимать и отвечать на запросы людей.", 12 | "instruction": "Выполняйте задания, чтобы помочь обучить модель и набрать очки." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/ru/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Принять", 3 | "content": "Чтобы продолжить работу с Open Assistant, вам необходимо принять наше Пользовательское Соглашение.", 4 | "decline": "Отклонить", 5 | "title": "Пользовательское Соглашение Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/sk/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Vyberte si úlohu!", 3 | "create": "Vytvoriť", 4 | "evaluate": "Vyhodnotiť", 5 | "label": "Štítok", 6 | "dashboard": "Prístrojová Doska", 7 | "go": "Choďte", 8 | "welcome_message": { 9 | "label": "Vitaj, {{username}}!", 10 | "contributor": "Prispievateľ", 11 | "description": "Open Assistant je asistent s otvoreným zdrojovým kódom umelej inteligencie, ktorý používa a trénuje pokročilé jazykové modely na porozumenie a reagovanie na ľudí.", 12 | "instruction": "Plňte úlohy, ktoré pomáhajú trénovať model a získavať body." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/sk/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Podmienky používania služby Open Assistant", 3 | "content": "Ak chcete pokračovať v používaní aplikácie Open Assistant, musíte najprv prijať naše podmienky používania.", 4 | "accept": "Prijať", 5 | "decline": "Pokles" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/sl/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "Zbrišite račun", 3 | "delete_account_data": "Vsi prispevani podatki v Open Assistant, z reševanjem opravil, razvrščanjem sporočil in pogovori, ki so bili v uporabi storitve klepeta, bodo obdržani. Vsi sklici na prvotnega uporabnika pa so anonimni.", 4 | "delete_account_intro": "Brisanje računa pomeni naslednje:", 5 | "delete_account_leaderboard": "Računi zbrisanih uporabnikov se ne bodo prikazovali na lestvicah", 6 | "delete_account_permanent": "To dejanje je trajno in ga ni mogoče razveljaviti", 7 | "go_to_dashboard": "Nazaj na nadzorno ploščo dashboard", 8 | "yes_delete": "Da, trajno izbrišite moj račun" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/sl/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Zgrabite nalogo!", 3 | "create": "Ustvarite", 4 | "evaluate": "Ocenite", 5 | "label": "Oznaka", 6 | "dashboard": "Nadzorna plošča", 7 | "go": "Pojdite", 8 | "welcome_message": { 9 | "label": "Dobrodošli, {{username}}!", 10 | "contributor": "Darovalec", 11 | "description": "Open Assistant je odprtokodni AI asistent, ki uporablja in usposablja napredne jezikovne modele za razumevanje ljudi in odzivanje na njihove ukaze.", 12 | "instruction": "Dokončajte naloge za pomoč pri usposabljanju modela in osvojite točke." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/sl/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Sprejmite", 3 | "content": "Za nadaljevanje uporabe Open Assistant, morate prvo sprejeti naše pogoje storitev.", 4 | "decline": "Zavrnite", 5 | "title": "Pogoji storitev za Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/sr/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "Brisanje naloga", 3 | "delete_account_data": "Svi podaci koji su doprineli \"Open Assistant\" projektu u rešavanju zadataka, rangiranju poruka i svim razgovorima koji su vođeni korišćenjem usluge chat-a, biće zadržani. Međutim, sve reference na prvobitnog korisnika su anonimne.", 4 | "delete_account_intro": "Brisanje naloga podrazumeva sledeće:", 5 | "delete_account_leaderboard": "Nalozi izbrisanih korisnika se neće pojavljivati na rang listama", 6 | "delete_account_permanent": "Ova radnja je trajna i ne može se opozvati!", 7 | "go_to_dashboard": "Vratite se na kontrolnu tablu", 8 | "yes_delete": "Da, trajno obriši moj nalog" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/sr/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Zgrabi zadatak!", 3 | "create": "Kreiraj", 4 | "evaluate": "Evaluiraj", 5 | "label": "Oznaka", 6 | "dashboard": "Kontrolna tabla", 7 | "go": "Kreni", 8 | "welcome_message": { 9 | "label": "Dobrodošli, {{username}}!", 10 | "contributor": "Saradnik", 11 | "description": "„Open Assistant“ je AI asistent otvorenog koda koji koristi i obučava napredne jezičke modele da razume ljude i odgovori na njihova pitanja.", 12 | "instruction": "Kompletirajte zadatke koji će nam pomoći da što bolje obučimo AI model i pri tome osvojite poene." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/sr/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Prihvatam", 3 | "content": "Da biste nastavili da koristite „Open Assistant“, prvo morate da prihvatite naše Uslove korišćenja usluge.", 4 | "decline": "Odbijam", 5 | "title": "Uslovi korišćenja usluge „Open Assistant“" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/sv/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Fixa en uppgift!", 3 | "create": "Skapa", 4 | "evaluate": "Utvärdera", 5 | "label": "Beteckning", 6 | "dashboard": "Instrumentpanel", 7 | "go": "Kör", 8 | "welcome_message": { 9 | "label": "Välkommen, {{username}}!", 10 | "contributor": "Bidragsgivare", 11 | "description": "Open Assistant är en AI-assistent med öppen källkod som använder och tränar avancerade språkmodeller för att förstå och besvara människor.", 12 | "instruction": "Slutför uppgifter för att hjälpa till att träna modellen och för att erhålla poäng." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/sv/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Användarvillkor för Open Assistant", 3 | "content": "För att fortsätta använda Open Assistant måste du först acceptera våra användarvillkor.", 4 | "accept": "Acceptera", 5 | "decline": "Avböj" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/swg/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Schnapp dir a Aufgäble!", 3 | "create": "Erstella", 4 | "evaluate": "Auswerta", 5 | "label": "Labela", 6 | "dashboard": "Dashboard", 7 | "go": "Los", 8 | "welcome_message": { 9 | "label": "Schee dass de do bisch, {{username}}!", 10 | "contributor": "Mitarbeiter", 11 | "description": "Open Assistant isch a open-source KI-Assistent der halt neue Language Models nemmt und trainiert, damit er alle Leid verstanda ond mit ihne schwätza ko.", 12 | "instruction": "Schliesch doch au a paar Aufgäbla ab om mit dem Training zom helfa und dir a paar Pünktla zom verdiena. Zeig alle was fir en Schwoab de bisch!" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/swg/leaderboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "daily": "Heit", 3 | "label": "Labels", 4 | "last_updated_at": "Letschdmoal aktualisiert: {{val, datetime}}", 5 | "leaderboard": "Beschdenliste", 6 | "monthly": "Monat", 7 | "next": "Nägschde", 8 | "overall": "Gsamt", 9 | "previous": "Ledschte", 10 | "prompt": "Prompts", 11 | "rank": "Rang", 12 | "reply": "Antworta", 13 | "score": "Punkte", 14 | "top_5_contributors_today": "Beschte 5 Schwoaba heit", 15 | "user": "Benutzer", 16 | "view_all": "Alle oazeiga", 17 | "weekly": "Dui Woch" 18 | } 19 | -------------------------------------------------------------------------------- /website/public/locales/swg/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Akzeptiera (Hajoa)", 3 | "content": "Om Open Assistant weiterhin nemma zu könna, musch du zerscht onsere Nutzungsbedingunga akzeptiera.", 4 | "decline": "Ablehnen (Ha noi)", 5 | "title": "Nutzungsbedingungen fiar Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/th/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "back_to_chat_list": "กลับไปรายการแชท", 3 | "your_chats": "แชทของคุณ" 4 | } 5 | -------------------------------------------------------------------------------- /website/public/locales/th/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "รับงาน!", 3 | "create": "สร้าง", 4 | "evaluate": "ประเมิน", 5 | "label": "ป้ายกำกับ", 6 | "dashboard": "แผงควบคุม", 7 | "go": "ไป" 8 | } 9 | -------------------------------------------------------------------------------- /website/public/locales/th/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "ข้อกำหนดในการให้บริการสำหรับ Open Assistant", 3 | "content": "หากต้องการใช้ Open Assistant ต่อไป คุณต้องยอมรับข้อกำหนดในการให้บริการของเราก่อน", 4 | "accept": "ยอมรับ", 5 | "decline": "ปฏิเสธ" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/tr/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "back_to_chat_list": "Sohbet listesine dön", 3 | "chat_date": "{{val, datetime}}", 4 | "config_title": "Sohbet ayarları", 5 | "empty": "(boş)", 6 | "login_message": "Bu özelliği kullanmak için tekrar giriş yapmanız gerekmektedir. Bu sağlayıcılardan birini kullanarak giriş yapın:", 7 | "model": "Model", 8 | "preset": "Önayar", 9 | "preset_custom": "Özel önayar", 10 | "queue_info": "Mesajınız kuyruğa alındı, kuyrukta {{queuePosition, number, integer }}. sıradasınız.", 11 | "you_are_logged_in": "Sohbet hizmetinde oturum açtınız", 12 | "your_chats": "Sohbetleriniz" 13 | } 14 | -------------------------------------------------------------------------------- /website/public/locales/tr/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Bir görev seçin!", 3 | "create": "Oluştur", 4 | "evaluate": "Değerlendir", 5 | "label": "Etiket", 6 | "dashboard": "Kontrol Paneli", 7 | "go": "Git", 8 | "welcome_message": { 9 | "label": "Hoş geldin, {{username}}!", 10 | "contributor": "Katkıda bulunan", 11 | "description": "Open Assistant, insanları anlamak ve onlara cevap vermek amacıyla gelişmiş dil modellerini kullanan ve eğiten açık kaynaklı bir yapay zeka asistanıdır.", 12 | "instruction": "Modeli eğitmeye yardımcı olmak ve puan kazanmak için görevleri tamamlayın." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/tr/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Kabul Et", 3 | "content": "Open Assistant'ı kullanmaya devam etmek için ilk önce Kullanım Şartları'nı kabul etmeniz gerekmektedir.", 4 | "decline": "Reddet", 5 | "title": "Open Assistant için Kullanım Şartları" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/uk-UA/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "Видалити мій обліковий запис", 3 | "delete_account_data": "Усі дані, надані Open Assistant у вигляді виконаних завдань, оцінених повідомлень та будь-яких розмов в чаті, будуть збережені. Однак всі дані будуть анонімізовані.", 4 | "delete_account_intro": "Видалення облікового запису передбачає наступне:", 5 | "delete_account_leaderboard": "Облікові записи видалених користувачів не будуть відображатися в таблиці лідерів", 6 | "delete_account_permanent": "Ця дія є необоротною і не може бути скасована.", 7 | "go_to_dashboard": "Повернутися до панелі керування", 8 | "yes_delete": "Так, видалити мій обліковий запис назавжди" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/uk-UA/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "Допомога у зборі даних", 3 | "create": "Створити", 4 | "evaluate": "Оцінити", 5 | "label": "Класифікувати", 6 | "dashboard": "Головна панель", 7 | "go": "Почати", 8 | "welcome_message": { 9 | "label": "Ласкаво просимо, {{username}}!", 10 | "contributor": "Учасник", 11 | "description": "Open Assistant - це асистент зі штучним інтелектом з відкритим кодом, який використовує та навчає передові мовні моделі, щоб розуміти та реагувати на мову людини.", 12 | "instruction": "Виконуйте завдання, щоб тренувати модель і заробляти бали." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/uk-UA/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Прийняти", 3 | "content": "Щоб продовжити користуватися Open Assistant, ви повинні спочатку прийняти наші Умови надання послуг.", 4 | "decline": "Відхилити", 5 | "title": "Умови надання послуг для Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/vi/chat.json: -------------------------------------------------------------------------------- 1 | { 2 | "back_to_chat_list": "Quay về danh sách trò chuyện", 3 | "your_chats": "Lịch sử trò chuyện" 4 | } 5 | -------------------------------------------------------------------------------- /website/public/locales/vi/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "create": "Tạo", 3 | "dashboard": "Trang chính", 4 | "evaluate": "Kiểm tra", 5 | "go": "Xem", 6 | "grab_a_task": "Danh sách việc", 7 | "label": "Nhãn", 8 | "welcome_message": { 9 | "label": "Xin chào, {{username}}!", 10 | "contributor": "Người đóng góp", 11 | "description": "Open Assistant là chatbot mã nguồn mở sử dụng AI để hiểu và trả lời tin nhắn.", 12 | "instruction": "Hoàn thành các nhiệm vụ ở dưới để làm dữ liệu cho Open Assistant và có thêm điểm." 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/vi/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "accept": "Chấp nhận", 3 | "content": "Để tiếp tục sử dụng Open Assistant, bản phải chấp nhận điều khoản sử dụng.", 4 | "decline": "Không chấp nhận", 5 | "title": "Điều khoản sử dụng của Open Assistant" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/locales/zh/account.json: -------------------------------------------------------------------------------- 1 | { 2 | "delete_account": "注销账户", 3 | "delete_account_data": "通过任务, 投票和聊天服务为 Open Assistant 贡献的数据都将被保留. 不过, 这些数据是完全匿名的.", 4 | "delete_account_intro": "注销账户需确认以下事项:", 5 | "delete_account_leaderboard": "已删除的用户将不再显示在排行榜上.", 6 | "delete_account_permanent": "注销账户是永久且不可撤销的", 7 | "go_to_dashboard": "返回面板", 8 | "yes_delete": "确认, 永久注销我的账户" 9 | } 10 | -------------------------------------------------------------------------------- /website/public/locales/zh/dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "grab_a_task": "任务: 请您以扮演AI和提示者的方式,帮助我们建立一套自然的对话数据集。", 3 | "create": "创建", 4 | "evaluate": "评估", 5 | "label": "标注", 6 | "dashboard": "面板", 7 | "go": "前往", 8 | "welcome_message": { 9 | "label": "欢迎您, {{username}}!", 10 | "contributor": "贡献者", 11 | "description": "Open Assistant 是一个开源的人工智能助理平台,目标是训练大型语言模型,使它学会怎样理解和回复人类。", 12 | "instruction": "以完成任务的形式,帮助我们建立用于训练模型的对话数据集,并获得积分。" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/public/locales/zh/error.json: -------------------------------------------------------------------------------- 1 | { 2 | "default": "发生未知错误!", 3 | "err_1000": "无效的任务类型", 4 | "err_1001": "未能确认任务", 5 | "err_1002": "未能否定任务", 6 | "err_1003": "无效的响应类型", 7 | "err_1004": "交互请求失败", 8 | "err_1005": "无法生成任务", 9 | "err_1006": "目前没有类型为 {{task_type}} 的任务", 10 | "err_1007": "任务可用性查询失败", 11 | "err_1008": "消息过长", 12 | "err_1009": "您最近的消息有重复", 13 | "err_1010": "消息文本为空", 14 | "err_1011": "您不能多次回复同一条消息", 15 | "err_1012": "您有太多未完成的任务, 请稍后再试" 16 | } 17 | -------------------------------------------------------------------------------- /website/public/locales/zh/stats.json: -------------------------------------------------------------------------------- 1 | { 2 | "aborted_low_grade": "低品质终止", 3 | "assistant": "助手", 4 | "backlog_ranking": "积压排名", 5 | "choose_a_language": "选择语言", 6 | "count": "计数", 7 | "growing": "增长", 8 | "halted_by_moderator": "被管理员停止", 9 | "human_messages_by_lang": "按语言分类的用户回复", 10 | "human_messages_by_role": "按角色分类的用户回复", 11 | "initial_prompt_review": "初始提示词的审核", 12 | "language_stats": "语言统计", 13 | "message_trees_by_state": "消息树状态", 14 | "message_trees_states_by_lang": "语言分类的消息树状态", 15 | "prompt_lottery_waiting": "等待被抽样的提示词", 16 | "prompter": "提示词工程师", 17 | "ranking": "排行榜", 18 | "ready_for_export": "准备导出", 19 | "stats": "数据统计", 20 | "users_accepted_tos": "接受服务条款的用户" 21 | } 22 | -------------------------------------------------------------------------------- /website/public/locales/zh/tos.json: -------------------------------------------------------------------------------- 1 | { 2 | "title": "Open Assistant 服务条款", 3 | "content": "你需要接受服务条款以才能继续使用 Open Assistant", 4 | "accept": "接受", 5 | "decline": "拒绝" 6 | } 7 | -------------------------------------------------------------------------------- /website/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Open Assistant", 3 | "short_name": "Open Assistant", 4 | "description": "Open Assistant is a project meant to give everyone access to a great chat based large language model.", 5 | "start_url": "/", 6 | "display": "standalone", 7 | "background_color": "#ffffff", 8 | "theme_color": "#3182CE", 9 | "icons": [ 10 | { 11 | "src": "/images/logos/logo.png", 12 | "sizes": "512x512", 13 | "type": "image/png" 14 | }, 15 | { 16 | "src": "/images/logos/logo_192x192.png", 17 | "sizes": "192x192", 18 | "type": "image/png" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /website/src/components/AnimatedCircles/index.tsx: -------------------------------------------------------------------------------- 1 | export { AnimatedCircles } from "./AnimatedCircles"; 2 | -------------------------------------------------------------------------------- /website/src/components/AuthLayout.tsx: -------------------------------------------------------------------------------- 1 | import { Box, useColorModeValue } from "@chakra-ui/react"; 2 | import { ReactNode } from "react"; 3 | 4 | export function AuthLayout({ children }: { children: ReactNode }) { 5 | const bgColorClass = useColorModeValue("gray.50", "gray.900"); 6 | 7 | return ( 8 | 9 |
10 |
11 | {children} 12 |
13 |
14 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /website/src/components/Buttons/Buttons.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from "@storybook/react"; 2 | 3 | import { LikertButtons } from "./LikertButtons"; 4 | import { SubmitButton } from "./Submit"; 5 | 6 | export default { 7 | title: "Buttons", 8 | } as ComponentMeta; 9 | 10 | export const Submit = () => Submit; 11 | 12 | export const Likert = () => { 13 | return ( 14 | console.log("onChange")} 19 | > 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /website/src/components/Buttons/Submit.tsx: -------------------------------------------------------------------------------- 1 | import { Button, ButtonProps } from "@chakra-ui/react"; 2 | 3 | export const SubmitButton = ({ children, ...props }: ButtonProps) => { 4 | return ( 5 | 8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /website/src/components/Chat/ChatConfig.tsx: -------------------------------------------------------------------------------- 1 | import { ChatConfigDesktop } from "./ChatConfigDesktop"; 2 | import { ChatConfigForm } from "./ChatConfigForm"; 3 | import { ChatConfigMobile } from "./ChatConfigMobile"; 4 | 5 | const form = ; 6 | 7 | export const ChatConfig = () => { 8 | return ( 9 | <> 10 | {form} 11 | {form} 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /website/src/components/Chat/ChatInputIconButton.tsx: -------------------------------------------------------------------------------- 1 | import { Box, BoxProps } from "@chakra-ui/react"; 2 | import { LucideIcon } from "lucide-react"; 3 | 4 | export const ChatInputIconButton = ({ icon: Icon, ...props }: { icon: LucideIcon } & BoxProps) => ( 5 | 17 | 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /website/src/components/Chat/ChatListDesktop.tsx: -------------------------------------------------------------------------------- 1 | import { ChatListBase } from "./ChatListBase"; 2 | 3 | const display = { base: "none", lg: "flex" }; 4 | 5 | export const ChatListDesktop = () => { 6 | return ; 7 | }; 8 | -------------------------------------------------------------------------------- /website/src/components/Chat/ChatViewSelection.tsx: -------------------------------------------------------------------------------- 1 | import { Select, SelectProps } from "@chakra-ui/react"; 2 | import { useTranslation } from "next-i18next"; 3 | 4 | export const ChatViewSelection = (props: SelectProps) => { 5 | const { t } = useTranslation("chat"); 6 | 7 | return ( 8 | 12 | ); 13 | }; 14 | -------------------------------------------------------------------------------- /website/src/components/Chat/ChatWarning.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from "@chakra-ui/react"; 2 | import { useTranslation } from "next-i18next"; 3 | import { memo } from "react"; 4 | 5 | export const ChatWarning = memo(function ChatWarning() { 6 | const { t } = useTranslation("chat"); 7 | return ( 8 | 9 | {t("warning")} 10 | 11 | ); 12 | }); 13 | -------------------------------------------------------------------------------- /website/src/components/Chat/DeletePresetButton.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "@chakra-ui/react"; 2 | import { useTranslation } from "next-i18next"; 3 | 4 | export const DeletePresetButton = ({ onClick }: { onClick: () => void }) => { 5 | const { t } = useTranslation(); 6 | 7 | return ( 8 | 11 | ); 12 | }; 13 | -------------------------------------------------------------------------------- /website/src/components/Chat/QueueInfoMessage.tsx: -------------------------------------------------------------------------------- 1 | import { useTranslation } from "next-i18next"; 2 | import { QueueInfo } from "src/lib/chat_stream"; 3 | 4 | export const QueueInfoMessage = ({ info }: { info: QueueInfo }) => { 5 | const { t } = useTranslation("chat"); 6 | return <>{t("queue_info", info)}; 7 | }; 8 | -------------------------------------------------------------------------------- /website/src/components/CollapsableText.tsx: -------------------------------------------------------------------------------- 1 | import { useBreakpointValue } from "@chakra-ui/react"; 2 | 3 | export const CollapsableText = ({ text }: { text: string }) => { 4 | const maxLength = useBreakpointValue({ base: 220, md: 500, lg: 700, xl: 1000 }); 5 | if (typeof text !== "string" || text.length <= maxLength) { 6 | return <>{text}; 7 | } else { 8 | const visibleText = text.substring(0, maxLength - 3); 9 | return {visibleText}...; 10 | } 11 | }; 12 | -------------------------------------------------------------------------------- /website/src/components/Container.tsx: -------------------------------------------------------------------------------- 1 | import clsx from "clsx"; 2 | 3 | export function Container({ className, ...props }) { 4 | return
; 5 | } 6 | -------------------------------------------------------------------------------- /website/src/components/Dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export { LeaderboardWidget } from "./LeaderboardWidget"; 2 | export { TaskOption } from "./TaskOption"; 3 | export { WelcomeCard } from "./WelcomeCard"; 4 | -------------------------------------------------------------------------------- /website/src/components/DataTable/DataTableAction.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef, IconButton, IconButtonProps } from "@chakra-ui/react"; 2 | import { LucideIcon } from "lucide-react"; 3 | 4 | export type DataTableActionProps = Omit & { icon: LucideIcon }; 5 | 6 | // need to use forwardRef from Charka to support `as` props 7 | // https://chakra-ui.com/community/recipes/as-prop 8 | export const DataTableAction = forwardRef((props: DataTableActionProps, ref) => { 9 | return } ref={ref} />; 10 | }); 11 | -------------------------------------------------------------------------------- /website/src/components/Header/ColorModeToggler.tsx: -------------------------------------------------------------------------------- 1 | import { Button, useColorMode } from "@chakra-ui/react"; 2 | import { Moon, Sun } from "lucide-react"; 3 | 4 | const ColorModeToggler = () => { 5 | const { colorMode, toggleColorMode } = useColorMode(); 6 | 7 | return ( 8 | 11 | ); 12 | }; 13 | 14 | export { ColorModeToggler }; 15 | -------------------------------------------------------------------------------- /website/src/components/Header/index.ts: -------------------------------------------------------------------------------- 1 | export { Header } from "./Header"; 2 | export { UserMenu } from "./UserMenu"; 3 | -------------------------------------------------------------------------------- /website/src/components/JsonCard.tsx: -------------------------------------------------------------------------------- 1 | import { Card, CardBody } from "@chakra-ui/card"; 2 | import { CardBodyProps, CardProps } from "@chakra-ui/react"; 3 | import { StrictOmit } from "ts-essentials"; 4 | 5 | type JsonCardProps = StrictOmit & { 6 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 7 | children: any; 8 | bodyProps?: CardBodyProps; 9 | }; 10 | 11 | export const JsonCard = ({ children, bodyProps, ...props }: JsonCardProps) => { 12 | return ( 13 | 14 | 15 |
{JSON.stringify(children, null, 2)}
16 |
17 |
18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /website/src/components/LanguageSelector/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./LanguageSelector"; 2 | -------------------------------------------------------------------------------- /website/src/components/LeaderboardTable/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./LeaderboardTable"; 2 | -------------------------------------------------------------------------------- /website/src/components/Loading/Loading.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { ComponentStory } from "@storybook/react"; 2 | 3 | import { LoadingScreen } from "./LoadingScreen"; 4 | 5 | // eslint-disable-next-line import/no-anonymous-default-export 6 | export default { 7 | title: "Example/LoadingScreen", 8 | component: LoadingScreen, 9 | parameters: { 10 | layout: "fullscreen", 11 | }, 12 | }; 13 | 14 | const Template: ComponentStory = (args) => ; 15 | 16 | export const Default = Template.bind({}); 17 | 18 | export const WithText = Template.bind({}); 19 | WithText.args = { text: "Loading Text ..." }; 20 | -------------------------------------------------------------------------------- /website/src/components/Loading/LoadingScreen.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Center, Progress, Text } from "@chakra-ui/react"; 2 | 3 | export const LoadingScreen = ({ text = "Loading..." } = {}) => { 4 | return ( 5 | 6 | 7 | {text && ( 8 |
9 | {text} 10 |
11 | )} 12 |
13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /website/src/components/Messages/MessageInlineEmojiRow.tsx: -------------------------------------------------------------------------------- 1 | import { HStack, StackProps } from "@chakra-ui/react"; 2 | import { SyntheticEvent } from "react"; 3 | 4 | const stopPropagation = (e: SyntheticEvent) => e.stopPropagation(); 5 | 6 | export const MessageInlineEmojiRow = (props: StackProps) => { 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /website/src/components/Messages/MessageSyntheticBadge.tsx: -------------------------------------------------------------------------------- 1 | import { Badge, Tooltip } from "@chakra-ui/react"; 2 | import { useTranslation } from "next-i18next"; 3 | 4 | export const MessageSyntheticBadge = () => { 5 | const { t } = useTranslation("message"); 6 | 7 | return ( 8 | 9 | 10 | {t("synthetic")} 11 | 12 | 13 | ); 14 | }; 15 | -------------------------------------------------------------------------------- /website/src/components/Messages/SyntaxHighlighter.tsx: -------------------------------------------------------------------------------- 1 | import type { SyntaxHighlighterProps } from "react-syntax-highlighter"; 2 | import { PrismAsyncLight } from "react-syntax-highlighter"; 3 | import { oneDark } from "react-syntax-highlighter/dist/cjs/styles/prism"; 4 | 5 | export default function SyntaxHighlighter({ children, lang, ...props }: SyntaxHighlighterProps) { 6 | return ( 7 | 8 | {String(children).replace(/\n$/, "")} 9 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /website/src/components/Stats/index.ts: -------------------------------------------------------------------------------- 1 | export { Stats } from "./Stats"; 2 | -------------------------------------------------------------------------------- /website/src/components/Survey/SurveyCard.tsx: -------------------------------------------------------------------------------- 1 | import { Box, BoxProps, useColorModeValue } from "@chakra-ui/react"; 2 | import clsx from "clsx"; 3 | import { useMemo } from "react"; 4 | 5 | export const SurveyCard = (props: BoxProps) => { 6 | const backgroundColor = useColorModeValue("white", "gray.700"); 7 | 8 | const boxProps: BoxProps = useMemo( 9 | () => ({ 10 | gap: "2", 11 | borderRadius: "xl", 12 | shadow: "base", 13 | ...props, 14 | className: clsx("p-4 sm:p-6", props.className), 15 | }), 16 | [props] 17 | ); 18 | 19 | return ( 20 | 21 | {props.children} 22 | 23 | ); 24 | }; 25 | -------------------------------------------------------------------------------- /website/src/components/Survey/TwoColumnsWithCards.tsx: -------------------------------------------------------------------------------- 1 | import { Box, Stack } from "@chakra-ui/react"; 2 | import { SurveyCard } from "src/components/Survey/SurveyCard"; 3 | 4 | export const TwoColumnsWithCards = ({ children }: { children: React.ReactNode[] }) => { 5 | if (!Array.isArray(children) || children.length !== 2) { 6 | throw new Error("TwoColumns expects 2 children"); 7 | } 8 | 9 | const [first, second] = children; 10 | 11 | return ( 12 | 13 | 14 | {first} 15 | {second} 16 | 17 | 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /website/src/components/Tasks/LabelTask/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./LabelTask"; 2 | -------------------------------------------------------------------------------- /website/src/components/Tasks/Task/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./Task"; 2 | -------------------------------------------------------------------------------- /website/src/components/Tasks/TaskHeader/index.tsx: -------------------------------------------------------------------------------- 1 | export * from "./TaskHeader"; 2 | -------------------------------------------------------------------------------- /website/src/context/TaskContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from "react"; 2 | import { TaskApiHook } from "src/types/Hooks"; 3 | import { BaseTask, TaskInfo } from "src/types/Task"; 4 | import { AllTaskReplies } from "src/types/TaskResponses"; 5 | import { KnownTaskType } from "src/types/Tasks"; 6 | 7 | export interface TaskContextType 8 | extends Omit, "response"> { 9 | task: Task; 10 | taskInfo: TaskInfo; 11 | } 12 | 13 | export const TaskContext = createContext(null); 14 | 15 | export const useTaskContext = () => useContext>(TaskContext); 16 | -------------------------------------------------------------------------------- /website/src/flags.ts: -------------------------------------------------------------------------------- 1 | const flags = [{ name: "flagTest", isActive: false }]; 2 | 3 | export default flags; 4 | -------------------------------------------------------------------------------- /website/src/hooks/auth/useHasAnyRole.ts: -------------------------------------------------------------------------------- 1 | import { useSession } from "next-auth/react"; 2 | import { Role } from "src/components/RoleSelect"; 3 | 4 | export const useHasAnyRole = (roles: Role[]) => { 5 | const { data: session } = useSession(); 6 | 7 | return roles.some((role) => role === session?.user?.role); 8 | }; 9 | -------------------------------------------------------------------------------- /website/src/hooks/auth/useHasRole.ts: -------------------------------------------------------------------------------- 1 | import { useSession } from "next-auth/react"; 2 | import { Role } from "src/components/RoleSelect"; 3 | 4 | export const useHasRole = (role: Role) => { 5 | const { data: session } = useSession(); 6 | 7 | return session?.user?.role === role; 8 | }; 9 | -------------------------------------------------------------------------------- /website/src/hooks/chat/useMessageVote.ts: -------------------------------------------------------------------------------- 1 | import { post } from "src/lib/api"; 2 | import { API_ROUTES } from "src/lib/routes"; 3 | import useSWRMutation from "swr/mutation"; 4 | 5 | export const useMessageVote = () => { 6 | const { trigger } = useSWRMutation< 7 | any, 8 | any, 9 | any, 10 | { 11 | message_id: string; 12 | chat_id: string; 13 | score: number; 14 | } 15 | >(API_ROUTES.CHAT_MESSAGE_VOTE, post); 16 | return trigger; 17 | }; 18 | -------------------------------------------------------------------------------- /website/src/hooks/env/BrowserEnv.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from "react"; 2 | 3 | export interface BrowserConfig { 4 | BYE: boolean; 5 | ENABLE_CHAT: boolean; 6 | ENABLE_DRAFTS_WITH_PLUGINS: boolean; 7 | NUM_GENERATED_DRAFTS: number; 8 | ENABLE_EMAIL_SIGNIN: boolean; 9 | ENABLE_EMAIL_SIGNIN_CAPTCHA: boolean; 10 | CLOUDFLARE_CAPTCHA_SITE_KEY: string; 11 | CURRENT_ANNOUNCEMENT: string; 12 | } 13 | 14 | export const BrowserConfigContext = createContext({} as any); 15 | 16 | export const useBrowserConfig = () => useContext(BrowserConfigContext); 17 | -------------------------------------------------------------------------------- /website/src/hooks/locale/useCurrentLocale.ts: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | 3 | export const useCurrentLocale = () => useRouter().locale || "en"; 4 | -------------------------------------------------------------------------------- /website/src/hooks/message/useDeleteMessage.ts: -------------------------------------------------------------------------------- 1 | import { del } from "src/lib/api"; 2 | import { API_ROUTES } from "src/lib/routes"; 3 | import { mutate } from "swr"; 4 | import useSWRMutation from "swr/mutation"; 5 | 6 | export const useDeleteMessage = (messageId: string, onSuccess?: () => void) => { 7 | return useSWRMutation(API_ROUTES.ADMIN_DELETE_MESSAGE(messageId), del, { 8 | onSuccess: async () => { 9 | onSuccess?.(); 10 | await mutate( 11 | (key) => typeof key === "string" && (key.startsWith("/api/messages") || key.startsWith("/api/admin/messages")), 12 | undefined, 13 | { revalidate: true } 14 | ); 15 | }, 16 | }); 17 | }; 18 | -------------------------------------------------------------------------------- /website/src/hooks/message/useUndeleteMessage.ts: -------------------------------------------------------------------------------- 1 | import { put } from "src/lib/api"; 2 | import { API_ROUTES } from "src/lib/routes"; 3 | import { mutate } from "swr"; 4 | import useSWRMutation from "swr/mutation"; 5 | 6 | export const useUndeleteMessage = (messageId: string, onSuccess?: () => void) => { 7 | return useSWRMutation(API_ROUTES.ADMIN_UNDELETE_MESSAGE(messageId), put, { 8 | onSuccess: async () => { 9 | onSuccess?.(); 10 | await mutate( 11 | (key) => typeof key === "string" && (key.startsWith("/api/messages") || key.startsWith("/api/admin/messages")), 12 | undefined, 13 | { revalidate: true } 14 | ); 15 | }, 16 | }); 17 | }; 18 | -------------------------------------------------------------------------------- /website/src/hooks/ui/useFallbackRef.ts: -------------------------------------------------------------------------------- 1 | import { ForwardedRef, RefObject, useRef } from "react"; 2 | 3 | export const useFallbackRef = (maybeRef?: ForwardedRef) => { 4 | const ref = useRef(null); 5 | 6 | return (maybeRef || ref) as RefObject; 7 | }; 8 | -------------------------------------------------------------------------------- /website/src/lib/defaultServerSideProps.ts: -------------------------------------------------------------------------------- 1 | import { serverSideTranslations } from "next-i18next/serverSideTranslations"; 2 | 3 | export const getDefaultServerSideProps = async ({ locale }) => ({ 4 | props: await serverSideTranslations(locale), 5 | }); 6 | 7 | export const getServerSideProps = getDefaultServerSideProps; 8 | export const getStaticProps = getDefaultServerSideProps; 9 | -------------------------------------------------------------------------------- /website/src/lib/errors.ts: -------------------------------------------------------------------------------- 1 | export const ERROR_CODES = { 2 | TASK_INVALID_REQUEST_TYPE: 1000, 3 | TASK_ACK_FAILED: 1001, 4 | TASK_NACK_FAILED: 1002, 5 | TASK_INVALID_RESPONSE_TYPE: 1003, 6 | TASK_INTERACTION_REQUEST_FAILED: 1004, 7 | TASK_GENERATION_FAILED: 1005, 8 | TASK_REQUESTED_TYPE_NOT_AVAILABLE: 1006, 9 | TASK_AVAILABILITY_QUERY_FAILED: 1007, 10 | TASK_MESSAGE_TOO_LONG: 1008, 11 | TASK_MESSAGE_DUPLICATED: 1009, 12 | TASK_MESSAGE_TEXT_EMPTY: 1010, 13 | TASK_MESSAGE_DUPLICATE_REPLY: 1011, 14 | TASK_TOO_MANY_PENDING: 1012, 15 | } as const; 16 | -------------------------------------------------------------------------------- /website/src/lib/i18n.ts: -------------------------------------------------------------------------------- 1 | export const getTypeSafei18nKey = (key: string) => key as unknown as TemplateStringsArray; 2 | -------------------------------------------------------------------------------- /website/src/lib/isChatEnable.ts: -------------------------------------------------------------------------------- 1 | import { boolean } from "boolean"; 2 | 3 | // only works server side 4 | export const isSSRChatEnabled = () => { 5 | return boolean(process.env.ENABLE_CHAT); 6 | }; 7 | -------------------------------------------------------------------------------- /website/src/lib/logger.ts: -------------------------------------------------------------------------------- 1 | import pino, { multistream } from "pino"; 2 | const isDev = process.env.NODE_ENV === "development"; 3 | 4 | const streams = [{ stream: process.stdout }]; 5 | 6 | // this should be imported from server side code only 7 | export const logger = pino( 8 | { 9 | level: isDev ? "debug" : "info", 10 | transport: isDev 11 | ? { 12 | target: "pino-pretty", 13 | options: { 14 | colorize: true, 15 | }, 16 | } 17 | : undefined, 18 | }, 19 | multistream(streams) 20 | ); 21 | -------------------------------------------------------------------------------- /website/src/lib/oasst_client_factory.ts: -------------------------------------------------------------------------------- 1 | import { JWT } from "next-auth/jwt"; 2 | import { OasstApiClient } from "src/lib/oasst_api_client"; 3 | import { getBackendUserCore } from "src/lib/users"; 4 | import { BackendUserCore } from "src/types/Users"; 5 | 6 | export const createApiClientFromUser = (user: BackendUserCore) => 7 | new OasstApiClient(process.env.FASTAPI_URL, process.env.FASTAPI_KEY, user); 8 | 9 | export const createApiClient = async (token: JWT) => createApiClientFromUser(await getBackendUserCore(token.sub)); 10 | 11 | export const userlessApiClient = new OasstApiClient(process.env.FASTAPI_URL, process.env.FASTAPI_KEY); 12 | -------------------------------------------------------------------------------- /website/src/lib/prismadb.ts: -------------------------------------------------------------------------------- 1 | // https://www.prisma.io/docs/guides/database/troubleshooting-orm/help-articles/nextjs-prisma-client-dev-practices 2 | import { PrismaClient } from "@prisma/client"; 3 | 4 | const globalForPrisma = global as unknown as { prisma: PrismaClient }; 5 | 6 | const prisma = globalForPrisma.prisma || new PrismaClient(); 7 | 8 | if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; 9 | 10 | export default prisma; 11 | -------------------------------------------------------------------------------- /website/src/middleware.ts: -------------------------------------------------------------------------------- 1 | export { default } from "next-auth/middleware"; 2 | 3 | /** 4 | * Guards these pages and redirects them to the sign in page. 5 | */ 6 | export const config = { 7 | matcher: [ 8 | "/create/:path*", 9 | "/evaluate/:path*", 10 | "/label/:path*", 11 | "/account/:path*", 12 | "/dashboard", 13 | "/admin/:path*", 14 | "/tasks/:path*", 15 | "/leaderboard", 16 | "/stats", 17 | "/messages/:path*", 18 | "/chat", 19 | "/chat/:path*", 20 | ], 21 | }; 22 | -------------------------------------------------------------------------------- /website/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Head, Html, Main, NextScript } from "next/document"; 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /website/src/pages/api/admin/delete_message/[id].ts: -------------------------------------------------------------------------------- 1 | import { withAnyRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withAnyRole(["admin", "moderator"], async (req, res, token) => { 5 | const { id } = req.query; 6 | try { 7 | const client = await createApiClient(token); 8 | await client.delete_message(id as string); 9 | res.status(200).json({ message: "Message deleted" }); 10 | } catch (e) { 11 | res.status(500).json({ message: "Failed to delete message" }); 12 | } 13 | }); 14 | 15 | export default handler; 16 | -------------------------------------------------------------------------------- /website/src/pages/api/admin/messages/[id]/history.ts: -------------------------------------------------------------------------------- 1 | import { withAnyRole } from "src/lib/auth"; 2 | import { createApiClientFromUser } from "src/lib/oasst_client_factory"; 3 | import { getBackendUserCore } from "src/lib/users"; 4 | 5 | export default withAnyRole(["moderator", "admin"], async (req, res, token) => { 6 | const { id } = req.query; 7 | 8 | const user = await getBackendUserCore(token.sub); 9 | const client = createApiClientFromUser(user); 10 | 11 | const revision_history = await client.fetch_message_revision_history(id as string); 12 | res.status(200).json(revision_history); 13 | }); 14 | -------------------------------------------------------------------------------- /website/src/pages/api/admin/set_tree_halted/[id].ts: -------------------------------------------------------------------------------- 1 | import { withAnyRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withAnyRole(["admin", "moderator"], async (req, res, token) => { 5 | const { id } = req.query; 6 | const halt = req.body as boolean; 7 | try { 8 | const client = await createApiClient(token); 9 | await client.set_tree_halted(id as string, req.body as boolean); 10 | res.status(200).json({ message: `Tree ${id} restarted`, id, halted: halt }); 11 | } catch (e) { 12 | res.status(500).json(e); 13 | } 14 | }); 15 | 16 | export default handler; 17 | -------------------------------------------------------------------------------- /website/src/pages/api/admin/undelete_message/[id].ts: -------------------------------------------------------------------------------- 1 | import { withAnyRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withAnyRole(["admin", "moderator"], async (req, res, token) => { 5 | const { id } = req.query; 6 | try { 7 | const client = await createApiClient(token); 8 | await client.undelete_message(id as string); 9 | res.status(200).json({ message: "Message undeleted" }); 10 | } catch (e) { 11 | res.status(500).json({ message: "Failed to undelete the message" }); 12 | } 13 | }); 14 | 15 | export default handler; 16 | -------------------------------------------------------------------------------- /website/src/pages/api/available_tasks.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { getLanguageFromRequest } from "src/lib/languages"; 3 | import { createApiClientFromUser } from "src/lib/oasst_client_factory"; 4 | import { getBackendUserCore } from "src/lib/users"; 5 | 6 | const handler = withoutRole("banned", async (req, res, token) => { 7 | const user = await getBackendUserCore(token.sub); 8 | const oasstApiClient = createApiClientFromUser(user!); 9 | const userLanguage = getLanguageFromRequest(req); 10 | const availableTasks = await oasstApiClient.fetch_available_tasks(user!, userLanguage); 11 | res.status(200).json(availableTasks); 12 | }); 13 | 14 | export default handler; 15 | -------------------------------------------------------------------------------- /website/src/pages/api/chat/events.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { isSSRChatEnabled } from "src/lib/isChatEnable"; 3 | import { createInferenceClient } from "src/lib/oasst_inference_client"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | if (!isSSRChatEnabled()) { 7 | return res.status(404).end(); 8 | } 9 | const { chat_id, message_id } = req.query; 10 | const client = createInferenceClient(token); 11 | const stream = await client.stream_events({ chat_id: chat_id as string, message_id: message_id as string }); 12 | res.status(200); 13 | stream.pipe(res); 14 | }); 15 | 16 | export default handler; 17 | -------------------------------------------------------------------------------- /website/src/pages/api/chat/message.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { isSSRChatEnabled } from "src/lib/isChatEnable"; 3 | import { createInferenceClient } from "src/lib/oasst_inference_client"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | if (!isSSRChatEnabled()) { 7 | return res.status(404).end(); 8 | } 9 | const client = createInferenceClient(token); 10 | 11 | const data = await client.get_message(req.query.chat_id as string, req.query.message_id as string); 12 | if (data) { 13 | return res.status(200).json(data); 14 | } 15 | res.status(400).end(); 16 | }); 17 | 18 | export default handler; 19 | -------------------------------------------------------------------------------- /website/src/pages/api/chat/models.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { isSSRChatEnabled } from "src/lib/isChatEnable"; 3 | import { createInferenceClient } from "src/lib/oasst_inference_client"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | if (!isSSRChatEnabled()) { 7 | return res.status(404).end(); 8 | } 9 | const client = createInferenceClient(token); 10 | const models = await client.get_models(); 11 | 12 | return res.status(200).json(models); 13 | }); 14 | 15 | export default handler; 16 | -------------------------------------------------------------------------------- /website/src/pages/api/chat/plugin_config.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createInferenceClient } from "src/lib/oasst_inference_client"; 3 | import { PluginEntry } from "src/types/Chat"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | const client = createInferenceClient(token); 7 | const { plugin } = req.body as { plugin: PluginEntry }; 8 | 9 | const data = await client.get_plugin_config({ plugin }); 10 | if (data) { 11 | return res.status(200).json(data); 12 | } 13 | res.status(400).end(); 14 | }); 15 | 16 | export default handler; 17 | -------------------------------------------------------------------------------- /website/src/pages/api/chat/plugins.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createInferenceClient } from "src/lib/oasst_inference_client"; 3 | 4 | const handler = withoutRole("banned", async (req, res, token) => { 5 | const client = createInferenceClient(token); 6 | 7 | const data = await client.get_plugins(); 8 | if (data) { 9 | return res.status(200).json(data); 10 | } 11 | res.status(400).end(); 12 | }); 13 | 14 | export default handler; 15 | -------------------------------------------------------------------------------- /website/src/pages/api/messages/[id]/children.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withoutRole("banned", async (req, res, token) => { 5 | const { id } = req.query; 6 | const client = await createApiClient(token); 7 | const messages = await client.fetch_message_children(id as string); 8 | res.status(200).json(messages); 9 | }); 10 | 11 | export default handler; 12 | -------------------------------------------------------------------------------- /website/src/pages/api/messages/[id]/conversation.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withoutRole("banned", async (req, res, token) => { 5 | const { id } = req.query; 6 | const client = await createApiClient(token); 7 | const messages = await client.fetch_conversation(id as string); 8 | res.status(200).json(messages); 9 | }); 10 | 11 | export default handler; 12 | -------------------------------------------------------------------------------- /website/src/pages/api/messages/[id]/index.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createApiClientFromUser } from "src/lib/oasst_client_factory"; 3 | import { getBackendUserCore } from "src/lib/users"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | const { id } = req.query; 7 | const user = await getBackendUserCore(token.sub); 8 | const client = createApiClientFromUser(user); 9 | const message = await client.fetch_message(id as string, user); 10 | res.status(200).json(message); 11 | }); 12 | 13 | export default handler; 14 | -------------------------------------------------------------------------------- /website/src/pages/api/messages/index.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { getLanguageFromRequest } from "src/lib/languages"; 3 | import { createApiClient } from "src/lib/oasst_client_factory"; 4 | 5 | const handler = withoutRole("banned", async (req, res, token) => { 6 | const client = await createApiClient(token); 7 | const userLanguage = getLanguageFromRequest(req); 8 | const messages = await client.fetch_recent_messages(userLanguage); 9 | res.status(200).json(messages); 10 | }); 11 | 12 | export default handler; 13 | -------------------------------------------------------------------------------- /website/src/pages/api/stats/cached_stats.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | const handler = withoutRole("banned", async (req, res, token) => { 5 | try { 6 | const client = await createApiClient(token); 7 | const data = await client.fetch_cached_stats(); 8 | res.status(200).json(data); 9 | } catch (e) { 10 | res.status(500).json({ error: "Error fetching stats" }); 11 | } 12 | }); 13 | 14 | export default handler; 15 | -------------------------------------------------------------------------------- /website/src/pages/api/valid_labels.ts: -------------------------------------------------------------------------------- 1 | import { withoutRole } from "src/lib/auth"; 2 | import { createApiClient } from "src/lib/oasst_client_factory"; 3 | 4 | /** 5 | * Returns the set of valid labels that can be applied to messages. 6 | */ 7 | const handler = withoutRole("banned", async (req, res, token) => { 8 | const { message_id } = req.query; 9 | const client = await createApiClient(token); 10 | const valid_labels = await client.fetch_valid_text(message_id as string); 11 | res.status(200).json(valid_labels); 12 | }); 13 | 14 | export default handler; 15 | -------------------------------------------------------------------------------- /website/src/pages/contributors.tsx: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/router"; 2 | import { useEffect } from "react"; 3 | 4 | const ContributorsPage = () => { 5 | const router = useRouter(); 6 | useEffect(() => { 7 | router.push("https://ykilcher.com/oa-contributors"); 8 | }, [router]); 9 | 10 | return null; 11 | }; 12 | 13 | export default ContributorsPage; 14 | -------------------------------------------------------------------------------- /website/src/pages/create/assistant_reply.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const AssistantReply = () => ; 7 | 8 | AssistantReply.getLayout = DashboardLayout; 9 | 10 | export default AssistantReply; 11 | -------------------------------------------------------------------------------- /website/src/pages/create/initial_prompt.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const InitialPrompt = () => ; 7 | 8 | InitialPrompt.getLayout = DashboardLayout; 9 | 10 | export default InitialPrompt; 11 | -------------------------------------------------------------------------------- /website/src/pages/create/user_reply.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const PrompterReply = () => ; 7 | 8 | PrompterReply.getLayout = DashboardLayout; 9 | 10 | export default PrompterReply; 11 | -------------------------------------------------------------------------------- /website/src/pages/evaluate/rank_assistant_replies.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const RankAssistantReplies = () => ; 7 | 8 | RankAssistantReplies.getLayout = DashboardLayout; 9 | 10 | export default RankAssistantReplies; 11 | -------------------------------------------------------------------------------- /website/src/pages/evaluate/rank_initial_prompts.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const RankInitialPrompts = () => ; 7 | 8 | RankInitialPrompts.getLayout = DashboardLayout; 9 | 10 | export default RankInitialPrompts; 11 | -------------------------------------------------------------------------------- /website/src/pages/evaluate/rank_user_replies.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const RankPrompterReplies = () => ; 7 | 8 | RankPrompterReplies.getLayout = DashboardLayout; 9 | 10 | export default RankPrompterReplies; 11 | -------------------------------------------------------------------------------- /website/src/pages/label/label_assistant_reply.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const LabelAssistantReply = () => ; 7 | 8 | LabelAssistantReply.getLayout = DashboardLayout; 9 | 10 | export default LabelAssistantReply; 11 | -------------------------------------------------------------------------------- /website/src/pages/label/label_initial_prompt.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const LabelInitialPrompt = () => ; 7 | 8 | LabelInitialPrompt.getLayout = DashboardLayout; 9 | 10 | export default LabelInitialPrompt; 11 | -------------------------------------------------------------------------------- /website/src/pages/label/label_prompter_reply.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | import { TaskType } from "src/types/Task"; 4 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 5 | 6 | const LabelPrompterReply = () => ; 7 | 8 | LabelPrompterReply.getLayout = DashboardLayout; 9 | 10 | export default LabelPrompterReply; 11 | -------------------------------------------------------------------------------- /website/src/pages/tasks/all.tsx: -------------------------------------------------------------------------------- 1 | import Head from "next/head"; 2 | import { TaskOption } from "src/components/Dashboard"; 3 | import { allTaskOptions } from "src/components/Dashboard/TaskOption"; 4 | import { DashboardLayout } from "src/components/Layout"; 5 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 6 | 7 | const AllTasks = () => { 8 | return ( 9 | <> 10 | 11 | All Tasks - Open Assistant 12 | 13 | 14 | 15 | 16 | ); 17 | }; 18 | 19 | AllTasks.getLayout = DashboardLayout; 20 | 21 | export default AllTasks; 22 | -------------------------------------------------------------------------------- /website/src/pages/tasks/random.tsx: -------------------------------------------------------------------------------- 1 | import { DashboardLayout } from "src/components/Layout"; 2 | import { TaskPage } from "src/components/TaskPage/TaskPage"; 3 | export { getStaticProps } from "src/lib/defaultServerSideProps"; 4 | import { TaskType } from "src/types/Task"; 5 | 6 | const Random = () => ; 7 | 8 | Random.getLayout = DashboardLayout; 9 | 10 | export default Random; 11 | -------------------------------------------------------------------------------- /website/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = (onPerfEntry) => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /website/src/styles/Chakra.tsx: -------------------------------------------------------------------------------- 1 | import { ChakraProvider, cookieStorageManagerSSR, localStorageManager } from "@chakra-ui/react"; 2 | import { PropsWithChildren } from "react"; 3 | 4 | import { theme } from "./Theme"; 5 | 6 | export function Chakra({ cookie, children }: PropsWithChildren<{ cookie?: string }>) { 7 | const colorModeManager = typeof cookie === "string" ? cookieStorageManagerSSR(cookie) : localStorageManager; 8 | 9 | return ( 10 | 11 | {children} 12 | 13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /website/src/styles/Theme/colors.ts: -------------------------------------------------------------------------------- 1 | export const colors = { 2 | light: { 3 | bg: "rgb(250,250,250)", 4 | text: "black", 5 | problem: "#E53E3E", 6 | active: "blue.400", 7 | }, 8 | dark: { 9 | bg: "gray.900", 10 | text: "white", 11 | problem: "#FC8181", 12 | active: "blue.500", 13 | }, 14 | "dark-blue-btn": { 15 | 200: "rgb(29,78,216)", 16 | 300: "blue", 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /website/src/styles/Theme/components/Badge.ts: -------------------------------------------------------------------------------- 1 | import { defineStyleConfig } from "@chakra-ui/react"; 2 | 3 | export const badgeTheme = defineStyleConfig({ 4 | baseStyle: { 5 | borderRadius: "lg", 6 | px: 2, 7 | py: 0.5, 8 | fontWeight: "600", 9 | textTransform: "none", 10 | }, 11 | defaultProps: { 12 | variant: "solid", 13 | colorScheme: "blue", 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /website/src/styles/Theme/components/Container.ts: -------------------------------------------------------------------------------- 1 | import { defineStyleConfig } from "@chakra-ui/styled-system"; 2 | 3 | const baseStyle = {}; 4 | 5 | const variants = { 6 | "no-padding": { 7 | padding: 0, 8 | }, 9 | }; 10 | 11 | export const containerTheme = defineStyleConfig({ 12 | baseStyle, 13 | variants, 14 | }); 15 | -------------------------------------------------------------------------------- /website/src/styles/Theme/components/Table.ts: -------------------------------------------------------------------------------- 1 | import { tableAnatomy } from "@chakra-ui/anatomy"; 2 | import { createMultiStyleConfigHelpers } from "@chakra-ui/react"; 3 | 4 | const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(tableAnatomy.keys); 5 | 6 | export const tableTheme = defineMultiStyleConfig({ 7 | variants: { 8 | simple: definePartsStyle(({ colorMode }) => { 9 | const isLightMode = colorMode === "light"; 10 | return { 11 | td: { 12 | borderColor: isLightMode ? "gray.100" : "gray.800", 13 | }, 14 | th: { 15 | borderColor: isLightMode ? "gray.100" : "gray.800", 16 | }, 17 | }; 18 | }), 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /website/src/styles/globals.css: -------------------------------------------------------------------------------- 1 | /* @tailwind base; */ 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | #__next { 6 | min-height: 100%; 7 | } 8 | -------------------------------------------------------------------------------- /website/src/test_pages/README.md: -------------------------------------------------------------------------------- 1 | # Page Tests 2 | 3 | Put all page tests in this directory with the pattern `MyPage.test.jsx`. We can't place them in `src/pages` due to how 4 | NextJS generates page routes. 5 | -------------------------------------------------------------------------------- /website/src/test_pages/about.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from "@testing-library/react"; 2 | import AboutPage from "src/pages/about"; 3 | 4 | describe("About page", () => { 5 | it("should render correctly", () => { 6 | render(); 7 | 8 | expect(screen.getByRole("heading", { level: 1 })).toHaveTextContent("What is OpenAssistant?"); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /website/src/test_pages/index.test.tsx: -------------------------------------------------------------------------------- 1 | import { render, screen } from "@testing-library/react"; 2 | import Home from "src/pages/index"; 3 | 4 | describe("Home page", () => { 5 | it("should render correctly", () => { 6 | render(); 7 | expect(screen.getByRole("heading", { level: 1 })).toHaveTextContent("Open Assistant"); 8 | }); 9 | }); 10 | -------------------------------------------------------------------------------- /website/src/types/Account.ts: -------------------------------------------------------------------------------- 1 | export type ExternalProvider = "google" | "discord"; 2 | 3 | export interface UserAccountResponse { 4 | emailIsVerified: boolean; 5 | accounts: Array<{ provider: ExternalProvider; providerAccountId: string }>; 6 | } 7 | -------------------------------------------------------------------------------- /website/src/types/Config.ts: -------------------------------------------------------------------------------- 1 | export interface BrowserConfig { 2 | BYE: boolean; 3 | ENABLE_CHAT: boolean; 4 | ENABLE_DRAFTS_WITH_PLUGINS: boolean; // Whether draft messages should be generated if plugins are in use 5 | NUM_GENERATED_DRAFTS: number; 6 | ENABLE_EMAIL_SIGNIN: boolean; 7 | ENABLE_EMAIL_SIGNIN_CAPTCHA: boolean; 8 | CLOUDFLARE_CAPTCHA_SITE_KEY: string; 9 | CURRENT_ANNOUNCEMENT: string; 10 | } 11 | -------------------------------------------------------------------------------- /website/src/types/Emoji.ts: -------------------------------------------------------------------------------- 1 | import { Flag, LucideIcon, ThumbsDown, ThumbsUp } from "lucide-react"; 2 | 3 | // Note: we use a Map here rather than just an object because the optimised 4 | // build "optimises" +1 to just 1 in the emoji name. 5 | export const emojiIcons = new Map([ 6 | ["+1", ThumbsUp], 7 | ["-1", ThumbsDown], 8 | ["flag", Flag], 9 | ["red_flag", Flag], 10 | ]); 11 | 12 | export const isKnownEmoji = (emoji: string) => emojiIcons.has(emoji); 13 | -------------------------------------------------------------------------------- /website/src/types/Hooks.ts: -------------------------------------------------------------------------------- 1 | import { BaseTask, TaskResponse } from "src/types/Task"; 2 | 3 | export type TaskApiHook = { 4 | response: TaskResponse; 5 | isLoading: boolean; 6 | completeTask: (interaction: ResponseContent) => Promise; 7 | rejectTask: () => Promise; 8 | isSubmitting: boolean; 9 | isRejecting: boolean; 10 | }; 11 | -------------------------------------------------------------------------------- /website/src/types/Providers.ts: -------------------------------------------------------------------------------- 1 | export type AuthMethod = "local" | "discord" | "google" | "system"; 2 | -------------------------------------------------------------------------------- /website/src/types/TaskResponses.ts: -------------------------------------------------------------------------------- 1 | export interface CreateTaskReply { 2 | text: string; 3 | } 4 | 5 | export interface EvaluateTaskReply { 6 | ranking: number[]; 7 | not_rankable: boolean; 8 | } 9 | 10 | export interface LabelTaskReply { 11 | text: string; 12 | labels: Record; 13 | message_id: string; 14 | } 15 | 16 | export type AllTaskReplies = CreateTaskReply | EvaluateTaskReply | LabelTaskReply; 17 | -------------------------------------------------------------------------------- /website/types/env.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | namespace NodeJS { 3 | interface ProcessEnv { 4 | NODE_ENV: "development" | "production"; 5 | CLOUDFLARE_CAPTCHA_SITE_KEY: string; 6 | CLOUDFLARE_CAPTCHA_SECRET_KEY: string; 7 | ENABLE_EMAIL_SIGNIN_CAPTCHA: boolean; 8 | ENABLE_EMAIL_SIGNIN: boolean; 9 | ADMIN_USERS: string; 10 | MODERATOR_USERS: string; 11 | INFERENCE_SERVER_HOST: string; 12 | BYE: boolean; 13 | ENABLE_CHAT: boolean; 14 | ENABLE_DRAFTS_WITH_PLUGINS: boolean; 15 | NUM_GENERATED_DRAFTS: number; 16 | CURRENT_ANNOUNCEMENT: string; 17 | } 18 | } 19 | } 20 | 21 | export {}; 22 | --------------------------------------------------------------------------------