└── projects ├── case_law_for_ai_policy ├── data │ ├── .gitignore │ └── create_demo_inputs.py ├── case-tools │ └── requirements.txt ├── interactive │ ├── backend │ │ ├── requirements.txt │ │ └── server.py │ └── frontend │ │ └── js │ │ └── index.js ├── docs │ └── assets │ │ ├── people │ │ ├── axz.png │ │ ├── cqz.png │ │ ├── kxia.jpg │ │ ├── kjfeng.jpg │ │ └── icheon.webp │ │ ├── pubs │ │ ├── phase_1_blog_post.pdf │ │ └── mp2_workshop_case_law.pdf │ │ └── img │ │ ├── refusal.svg │ │ ├── bot-profile.svg │ │ ├── content-violation.svg │ │ └── mobile-game.svg ├── .editorconfig └── .gitignore ├── deliberation_at_scale ├── .npmrc ├── .gitattributes ├── packages │ ├── data-core │ │ ├── src │ │ │ ├── database │ │ │ │ └── migrations │ │ │ │ │ ├── 0026_warm_silver_sable.sql │ │ │ │ │ ├── 0011_giant_unus.sql │ │ │ │ │ ├── 0015_colossal_runaways.sql │ │ │ │ │ ├── 0034_aberrant_nightshade.sql │ │ │ │ │ ├── 0003_wet_tana_nile.sql │ │ │ │ │ ├── 0020_dazzling_psylocke.sql │ │ │ │ │ ├── 0033_glossy_mockingbird.sql │ │ │ │ │ ├── 0017_useful_doctor_faustus.sql │ │ │ │ │ ├── 0024_slippery_carlie_cooper.sql │ │ │ │ │ ├── 0032_plain_sway.sql │ │ │ │ │ ├── 0016_short_bill_hollister.sql │ │ │ │ │ ├── 0002_talented_crusher_hogan.sql │ │ │ │ │ ├── 0007_lean_mantis.sql │ │ │ │ │ ├── 0014_tired_whiplash.sql │ │ │ │ │ ├── 0039_clean_black_widow.sql │ │ │ │ │ ├── 0010_black_toad.sql │ │ │ │ │ ├── 0008_sloppy_the_order.sql │ │ │ │ │ ├── 0029_open_cerise.sql │ │ │ │ │ ├── 0006_cynical_alex_wilder.sql │ │ │ │ │ ├── 0021_flaky_secret_warriors.sql │ │ │ │ │ ├── 0038_whole_lila_cheney.sql │ │ │ │ │ ├── 0028_shiny_roulette.sql │ │ │ │ │ ├── 0004_melted_sprite.sql │ │ │ │ │ ├── 0040_mature_puff_adder.sql │ │ │ │ │ ├── 0023_nosy_lila_cheney.sql │ │ │ │ │ ├── 0035_amused_sunfire.sql │ │ │ │ │ ├── 0041_free_talisman.sql │ │ │ │ │ ├── 0013_bumpy_magus.sql │ │ │ │ │ ├── 0022_fixed_argent.sql │ │ │ │ │ ├── 0025_new_chameleon.sql │ │ │ │ │ ├── 0009_living_steel_serpent.sql │ │ │ │ │ ├── 0030_colorful_patriot.sql │ │ │ │ │ ├── 0019_workable_chat.sql │ │ │ │ │ ├── 0037_chemical_overlord.sql │ │ │ │ │ └── 0012_slow_famine.sql │ │ │ ├── index.ts │ │ │ ├── config │ │ │ │ └── constants.ts │ │ │ └── commands │ │ │ │ ├── migrate.ts │ │ │ │ └── generateMagicLink.ts │ │ ├── .eslintrc.js │ │ ├── documentation │ │ │ ├── images │ │ │ │ └── entity-impression.png │ │ │ └── base-sql.md │ │ ├── .env.example │ │ ├── drizzle.config.ts │ │ ├── .gitignore │ │ └── tsconfig.json │ ├── frontend │ │ ├── graphql.config.yml │ │ ├── postcss.config.js │ │ ├── locales.js │ │ ├── hooks │ │ │ ├── useWhisper │ │ │ │ ├── index.ts │ │ │ │ ├── lamejs.d.ts │ │ │ │ └── configs.ts │ │ │ ├── useLanguage.ts │ │ │ ├── useLocalizedPush.ts │ │ │ ├── useChatFlowMessages.ts │ │ │ ├── useChatFlowState.ts │ │ │ └── useQuickReplies.tsx │ │ ├── app │ │ │ ├── [lang] │ │ │ │ ├── room │ │ │ │ │ └── [roomId] │ │ │ │ │ │ ├── page.tsx │ │ │ │ │ │ ├── ai │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ ├── chat │ │ │ │ │ │ └── page.tsx │ │ │ │ │ │ └── compact │ │ │ │ │ │ └── page.tsx │ │ │ │ ├── login │ │ │ │ │ ├── page.tsx │ │ │ │ │ └── anonymous │ │ │ │ │ │ └── page.tsx │ │ │ │ ├── register │ │ │ │ │ └── page.tsx │ │ │ │ ├── lobby │ │ │ │ │ ├── idle │ │ │ │ │ │ └── page.tsx │ │ │ │ │ ├── page.tsx │ │ │ │ │ ├── invalid │ │ │ │ │ │ └── page.tsx │ │ │ │ │ └── permission │ │ │ │ │ │ └── page.tsx │ │ │ │ ├── profile │ │ │ │ │ └── page.tsx │ │ │ │ └── evaluate │ │ │ │ │ └── [roomId] │ │ │ │ │ └── page.tsx │ │ │ ├── not-found.tsx │ │ │ └── globals.css │ │ ├── public │ │ │ ├── favicon.ico │ │ │ ├── images │ │ │ │ ├── logo.png │ │ │ │ ├── wordmark.png │ │ │ │ └── wordmark-bg-white.png │ │ │ └── favicon_io │ │ │ │ ├── favicon-16x16.png │ │ │ │ ├── favicon-32x32.png │ │ │ │ ├── apple-touch-icon.png │ │ │ │ ├── android-chrome-192x192.png │ │ │ │ ├── android-chrome-512x512.png │ │ │ │ └── site.webmanifest │ │ ├── documentation │ │ │ └── images │ │ │ │ ├── confirm-email-off.png │ │ │ │ └── basic-prototype-overview.png │ │ ├── state │ │ │ ├── queries │ │ │ │ ├── UpdateDemographics.graphql │ │ │ │ ├── PingParticipant.graphql │ │ │ │ ├── CreateParticipant.graphql │ │ │ │ ├── GetRoomParticipants.graphql │ │ │ │ ├── GetTopics.graphql │ │ │ │ ├── CreateHelpRequest.graphql │ │ │ │ ├── GetRoomOutcomes.graphql │ │ │ │ ├── UpdateNickName.graphql │ │ │ │ ├── GetUser.graphql │ │ │ │ ├── LeaveRoom.graphql │ │ │ │ ├── GetLobbyParticipants.graphql │ │ │ │ ├── EnterRoom.graphql │ │ │ │ ├── SendRoomMessage.graphql │ │ │ │ ├── CreateOpinion.graphql │ │ │ │ └── GetRooms.graphql │ │ │ ├── fragments │ │ │ │ ├── FullParticipant.graphql │ │ │ │ ├── FullOpinion.graphql │ │ │ │ └── FullOutcome.graphql │ │ │ ├── supabase.ts │ │ │ ├── slices │ │ │ │ ├── profile.ts │ │ │ │ └── fetches.ts │ │ │ ├── apollo.ts │ │ │ └── store.ts │ │ ├── .eslintrc.js │ │ ├── next.config.js │ │ ├── components │ │ │ ├── __Template.tsx │ │ │ ├── Divider.tsx │ │ │ ├── NoPrerender.tsx │ │ │ ├── LocalMedia │ │ │ │ └── context.ts │ │ │ ├── RoomConnection │ │ │ │ └── context.tsx │ │ │ ├── Loader.tsx │ │ │ ├── Pill.tsx │ │ │ └── RoomTranscription.tsx │ │ ├── utilities │ │ │ ├── text.ts │ │ │ ├── sleep.ts │ │ │ └── loadCatalog.ts │ │ ├── .storybook │ │ │ └── preview.ts │ │ ├── .env.example │ │ ├── pages │ │ │ └── api │ │ │ │ └── auth.ts │ │ ├── .gitignore │ │ ├── lingui.config.js │ │ └── tsconfig.json │ ├── orchestrator │ │ ├── .eslintrc.js │ │ ├── locales.js │ │ ├── src │ │ │ ├── tasks │ │ │ │ ├── reschedule.ts │ │ │ │ ├── enrichGroupIntroduction.ts │ │ │ │ ├── verifyEasyLanguage.ts │ │ │ │ └── enrichModeratorIntroduction.ts │ │ │ ├── utilities │ │ │ │ ├── time.ts │ │ │ │ └── participants.ts │ │ │ ├── config │ │ │ │ └── crontab.ts │ │ │ └── migrator.ts │ │ ├── .env.example │ │ ├── README.md │ │ ├── lingui.config.js │ │ ├── scripts │ │ │ └── setup-vps.sh │ │ ├── tsconfig.json │ │ └── .swcrc │ └── edge-functions │ │ ├── .env.example │ │ ├── supabase │ │ └── functions │ │ │ └── import_map.json │ │ └── .gitignore ├── documentation │ └── images │ │ └── logo.png ├── .editorconfig ├── nx.json ├── .gitignore ├── deliberation-at-scale.code-workspace └── .eslintrc.js ├── Aligned-Platform-EnergizeAI ├── app │ ├── .gitignore │ ├── .lintstagedrc │ ├── .prettierignore │ ├── src │ │ ├── lib │ │ │ ├── transformer.ts │ │ │ ├── spaces.ts │ │ │ └── use-debounce.ts │ │ ├── components │ │ │ ├── ui │ │ │ │ ├── aspect-ratio.tsx │ │ │ │ ├── loading-page.tsx │ │ │ │ ├── skeleton.tsx │ │ │ │ ├── theme-provider.tsx │ │ │ │ ├── collapsible.tsx │ │ │ │ ├── data-table-date-cell.tsx │ │ │ │ ├── no-data-warning.tsx │ │ │ │ ├── error-message.tsx │ │ │ │ ├── skeleton-card.tsx │ │ │ │ ├── small-spinner.tsx │ │ │ │ ├── section-header.tsx │ │ │ │ ├── separator.tsx │ │ │ │ ├── label.tsx │ │ │ │ ├── textarea.tsx │ │ │ │ ├── toaster.tsx │ │ │ │ ├── progress.tsx │ │ │ │ └── input.tsx │ │ │ ├── redirect.tsx │ │ │ ├── playground │ │ │ │ └── constitution.active-gradient.tsx │ │ │ ├── topics │ │ │ │ └── skeleton-topic-card.tsx │ │ │ ├── account │ │ │ │ └── layout.tsx │ │ │ ├── spaces │ │ │ │ └── layout.tsx │ │ │ └── contributions │ │ │ │ └── layout.tsx │ │ ├── pages │ │ │ ├── account │ │ │ │ ├── demographics.tsx │ │ │ │ └── profile.tsx │ │ │ └── spaces │ │ │ │ └── [space_id] │ │ │ │ ├── export.tsx │ │ │ │ └── index.tsx │ │ └── types │ │ │ ├── waitlist-types.ts │ │ │ ├── data-table-types.ts │ │ │ ├── association-types.ts │ │ │ └── process-env.ts │ ├── bun.lockb │ ├── commitlint.config.js │ ├── postcss.config.js │ ├── public │ │ ├── logo.png │ │ ├── favicon.ico │ │ ├── logolarge.png │ │ ├── logothin.png │ │ ├── thumbnail.png │ │ ├── EnergizeLogoFull.png │ │ ├── EnergizeLogoGraphic.png │ │ ├── images │ │ │ ├── blogs │ │ │ │ ├── welcome │ │ │ │ │ ├── globe1.png │ │ │ │ │ └── rate2.png │ │ │ │ └── howitworks │ │ │ │ │ ├── chat.png │ │ │ │ │ ├── rate.png │ │ │ │ │ ├── topic.png │ │ │ │ │ ├── abstract.jpg │ │ │ │ │ ├── propose.png │ │ │ │ │ └── needs-your-help.png │ │ │ └── democratic-inputs-to-ai.png │ │ └── vercel.svg │ ├── .env │ ├── next-env.d.ts │ ├── .eslintrc.json │ ├── components.json │ ├── .prettierrc │ ├── tsconfig.json │ └── README.md ├── .DS_Store └── process.png ├── making_ai_transparent_and_accountable ├── rappler_aidialogue │ ├── .nvmrc │ ├── hosting │ │ ├── .nvmrc │ │ ├── public │ │ │ └── static │ │ │ │ └── images │ │ │ │ ├── bat.png │ │ │ │ ├── camel.png │ │ │ │ ├── crow.png │ │ │ │ ├── dingo.png │ │ │ │ ├── duck.png │ │ │ │ ├── fox.png │ │ │ │ ├── frog.png │ │ │ │ ├── hippo.png │ │ │ │ ├── hyena.png │ │ │ │ ├── ibex.png │ │ │ │ ├── ifrit.png │ │ │ │ ├── koala.png │ │ │ │ ├── lemur.png │ │ │ │ ├── liger.png │ │ │ │ ├── llama.png │ │ │ │ ├── logo1.png │ │ │ │ ├── logo2.png │ │ │ │ ├── mink.png │ │ │ │ ├── moose.png │ │ │ │ ├── otter.png │ │ │ │ ├── panda.png │ │ │ │ ├── rhino.png │ │ │ │ ├── sheep.png │ │ │ │ ├── shrew.png │ │ │ │ ├── skunk.png │ │ │ │ ├── wolf.png │ │ │ │ ├── auroch.png │ │ │ │ ├── axolotl.png │ │ │ │ ├── badger.png │ │ │ │ ├── beaver.png │ │ │ │ ├── buffalo.png │ │ │ │ ├── cheetah.png │ │ │ │ ├── coyote.png │ │ │ │ ├── dolphin.png │ │ │ │ ├── dragon.png │ │ │ │ ├── ferret.png │ │ │ │ ├── giraffe.png │ │ │ │ ├── gopher.png │ │ │ │ ├── grizzly.png │ │ │ │ ├── iguana.png │ │ │ │ ├── jackal.png │ │ │ │ ├── kraken.png │ │ │ │ ├── leopard.png │ │ │ │ ├── manatee.png │ │ │ │ ├── monkey.png │ │ │ │ ├── narwhal.png │ │ │ │ ├── nyancat.png │ │ │ │ ├── penguin.png │ │ │ │ ├── pumpkin.png │ │ │ │ ├── python.png │ │ │ │ ├── quagga.png │ │ │ │ ├── rabbit.png │ │ │ │ ├── raccoon.png │ │ │ │ ├── turtle.png │ │ │ │ ├── walrus.png │ │ │ │ ├── wombat.png │ │ │ │ ├── alligator.png │ │ │ │ ├── anteater.png │ │ │ │ ├── armadillo.png │ │ │ │ ├── capybara.png │ │ │ │ ├── chameleon.png │ │ │ │ ├── chinchilla.png │ │ │ │ ├── chipmunk.png │ │ │ │ ├── chupacabra.png │ │ │ │ ├── cormorant.png │ │ │ │ ├── dinosaur.png │ │ │ │ ├── elephant.png │ │ │ │ ├── hedgehog.png │ │ │ │ ├── kangaroo.png │ │ │ │ ├── orangutan.png │ │ │ │ ├── platypus.png │ │ │ │ ├── slowloris.png │ │ │ │ ├── squirrel.png │ │ │ │ ├── wolverine.png │ │ │ │ └── btn_google_signin_dark_pressed_web.png │ │ ├── env.example │ │ ├── globals.css │ │ ├── components │ │ │ └── UserAvatar.js │ │ ├── .gitignore │ │ └── lib │ │ │ └── utils.js │ ├── .devcontainer │ │ └── env.example │ ├── functions │ │ ├── .gitignore │ │ ├── .eslintrc.js │ │ └── package.json │ ├── seed │ │ ├── auth_export │ │ │ └── config.json │ │ ├── firestore_export │ │ │ ├── all_namespaces │ │ │ │ └── all_kinds │ │ │ │ │ ├── output-0 │ │ │ │ │ └── all_namespaces_all_kinds.export_metadata │ │ │ └── firestore_export.overall_export_metadata │ │ └── firebase-export-metadata.json │ └── .firebaserc └── README.md ├── Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training └── frontend │ ├── frontend │ ├── src │ │ ├── App.css │ │ ├── main.jsx │ │ ├── components │ │ │ └── layout │ │ │ │ └── index.jsx │ │ ├── hooks │ │ │ └── user.js │ │ ├── utils │ │ │ └── isUsernameExists.js │ │ ├── App.jsx │ │ └── lib │ │ │ ├── routes.jsx │ │ │ └── firebase.js │ ├── public │ │ ├── login.png │ │ ├── main-page.png │ │ ├── register.png │ │ ├── after-login.png │ │ └── create-new-post.png │ ├── vite.config.js │ └── index.html │ └── package.json ├── democratic_fine_tuning ├── migrations │ ├── 20230907054722_evaluation │ │ └── migration.sql │ ├── 20230830041652_add_story_to_hypotheses │ │ └── migration.sql │ ├── 20230908075839_change_default_case │ │ └── migration.sql │ ├── 20230921165224_prolific_signup_type │ │ └── migration.sql │ ├── migration_lock.toml │ ├── 20230907183710_multi_case_chats │ │ └── migration.sql │ ├── 20230821182232_ │ │ └── migration.sql │ ├── 20230914141420_add_run_id_to_edge_hypothesis │ │ └── migration.sql │ ├── 20230914155552_add_relationship_and_comment_to_edges │ │ └── migration.sql │ ├── 20230919094955_save_story_and_run_id_to_edges │ │ └── migration.sql │ ├── 20230921124654_add_prolific_information_to_user │ │ └── migration.sql │ ├── 20230810112613_vectors │ │ └── migration.sql │ ├── 20230920144749_add_condition_to_edge_and_edge_hypothesis │ │ └── migration.sql │ ├── 20230922093003_add_case_id_to_votes_and_impressions │ │ └── migration.sql │ ├── 20230908081258_rename_case │ │ └── migration.sql │ ├── 20230911150601_on_delete_cascade_for_values_cards │ │ └── migration.sql │ ├── 20230824075024_chat_metadata │ │ └── migration.sql │ ├── 20230731144307_rm_constraint │ │ └── migration.sql │ ├── 20230907100156_chats_copy_functionality │ │ └── migration.sql │ ├── 20230919132258_drop_unnecessary_column_on_chat │ │ └── migration.sql │ ├── 20230922083205_drop_unnecessary_prolific_columns │ │ └── migration.sql │ ├── 20230811132015_rename_options_to_draw │ │ └── migration.sql │ ├── 20230731133752_constrain_chat_to_user │ │ └── migration.sql │ ├── 20230904100458_unqiue_constraint_canonical_cards │ │ └── migration.sql │ ├── 20230731135527_link_values_cards_to_user_directly_for_easier_querying │ │ └── migration.sql │ ├── 20230809115927_adding_vote_table │ │ └── migration.sql │ ├── 20230812133700_edge_renaming │ │ └── migration.sql │ └── 20230821195249_provisional_canonical_card │ │ └── migration.sql ├── remix.env.d.ts ├── graph.png ├── public │ └── favicon.ico ├── jest.config.js ├── tests │ └── transcripts │ │ └── no_function_call.json └── tsconfig.json ├── vtaiwan_and_chatham_house_bridging_the_recursive_public └── README.md ├── inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai └── Inclusive.AI app │ └── website │ ├── src │ ├── components │ │ ├── Navbar │ │ │ └── index.ts │ │ ├── Modal │ │ │ ├── index.ts │ │ │ └── ModalInnerBox.ts │ │ ├── LikertScale │ │ │ └── index.ts │ │ ├── Providers │ │ │ └── index.ts │ │ ├── VoteStats │ │ │ ├── index.ts │ │ │ └── BorderedLinearProgress.tsx │ │ ├── Chat │ │ │ ├── index.ts │ │ │ ├── MessageStack.tsx │ │ │ ├── PromptSuggestion.tsx │ │ │ └── MessageBoxScrollDownButton.tsx │ │ ├── ShadowedBox.tsx │ │ ├── SelectShowOnHoverBox.tsx │ │ ├── index.ts │ │ ├── ColumnRow.tsx │ │ ├── ValueQuestionBox.tsx │ │ ├── Link.tsx │ │ ├── LoadingScreen.tsx │ │ └── Proposal │ │ │ └── index.ts │ ├── layouts │ │ ├── index.ts │ │ ├── MainLayout.tsx │ │ └── BodyLayout.tsx │ ├── assets │ │ └── images │ │ │ ├── chat-gpt-logo.png │ │ │ └── dalle-nurse-helping-ceo.png │ ├── hooks │ │ ├── useWeb3Auth.ts │ │ └── index.ts │ ├── types │ │ ├── index.ts │ │ ├── chat.ts │ │ └── pod.ts │ └── services │ │ ├── index.ts │ │ ├── survey.ts │ │ └── discuss.ts │ ├── postcss.config.js │ ├── public │ ├── fonts │ │ └── Inter-roman.var.woff2 │ └── vercel.svg │ ├── README.md │ ├── tailwind.config.js │ └── tsconfig.json ├── collective_dialogues_for_democratic_input ├── img │ └── process-diagram.png └── experiments │ └── medical advice │ └── CD3 - med │ └── Policy eval - med.textClipping └── generative_social_choice └── README.md /projects/case_law_for_ai_policy/data/.gitignore: -------------------------------------------------------------------------------- 1 | raw/ 2 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/.npmrc: -------------------------------------------------------------------------------- 1 | save-exact=true 2 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.gitignore: -------------------------------------------------------------------------------- 1 | .vercel 2 | .DS_Store -------------------------------------------------------------------------------- /projects/deliberation_at_scale/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.sh text eol=lf -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/.nvmrc: -------------------------------------------------------------------------------- 1 | v20 2 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/.nvmrc: -------------------------------------------------------------------------------- 1 | v20 2 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/App.css: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/data/create_demo_inputs.py: -------------------------------------------------------------------------------- 1 | 2 | if __name__ == '__main__': 3 | import sys 4 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*": ["prettier --write --ignore-unknown"] 3 | } 4 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.prettierignore: -------------------------------------------------------------------------------- 1 | .next 2 | coverage 3 | dist 4 | compiled 5 | build-next-static -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/.devcontainer/env.example: -------------------------------------------------------------------------------- 1 | FIREBASE_PROJECT_ID=xxxxx -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/case-tools/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | openai 3 | langchain 4 | numpy 5 | pandas 6 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/functions/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | .secret.local -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/interactive/backend/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | flask 3 | flask-restful 4 | flask-socketio 5 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230907054722_evaluation/migration.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "Chat" ADD COLUMN "evaluation" JSONB; -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/remix.env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/auth_export/config.json: -------------------------------------------------------------------------------- 1 | {"signIn":{"allowDuplicateEmails":false}} -------------------------------------------------------------------------------- /projects/vtaiwan_and_chatham_house_bridging_the_recursive_public/README.md: -------------------------------------------------------------------------------- 1 | # vTaiwan and Chatham House: Bridging the Recursive Public 2 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/democratic_fine_tuning/graph.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/lib/transformer.ts: -------------------------------------------------------------------------------- 1 | import superjson from "superjson" 2 | 3 | export const transformer = superjson 4 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0026_warm_silver_sable.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "roomStatusType" ADD VALUE 'end'; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/graphql.config.yml: -------------------------------------------------------------------------------- 1 | schema: './generated/schema.graphql' 2 | documents: './**/*.graphql' 3 | 4 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/.DS_Store -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '../../.eslintrc.js', 4 | ], 5 | }; -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/process.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0011_giant_unus.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "moderations" ALTER COLUMN "type" SET DATA TYPE text; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0015_colossal_runaways.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "moderations" ADD COLUMN "statement" text; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0034_aberrant_nightshade.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "outcomeType" ADD VALUE 'cross_pollination'; -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/bun.lockb -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '../../.eslintrc.js', 4 | ], 5 | }; 6 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/democratic_fine_tuning/public/favicon.ico -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: ["gitmoji"], 3 | rules: { "type-empty": [0, "always"] }, 4 | } 5 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0003_wet_tana_nile.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "participants" ALTER COLUMN "room_id" DROP NOT NULL; 2 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Navbar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Navbar' 2 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/logo.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0020_dazzling_psylocke.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX IF NOT EXISTS "room_id_index" ON "outcomes" ("room_id"); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0033_glossy_mockingbird.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "messages" ADD COLUMN "tags" text DEFAULT '' NOT NULL; 2 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Modal/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ModalInnerBox' 2 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/favicon.ico -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/people/axz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/people/axz.png -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/people/cqz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/people/cqz.png -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/people/kxia.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/people/kxia.jpg -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0017_useful_doctor_faustus.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "rooms" ALTER COLUMN "status_type" SET DEFAULT 'group_intro'; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0024_slippery_carlie_cooper.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "opinions" ALTER COLUMN "participant_id" SET NOT NULL; 2 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230830041652_add_story_to_hypotheses/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "EdgeHypothesis" ADD COLUMN "story" TEXT; 3 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230908075839_change_default_case/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ALTER COLUMN "case" SET DEFAULT 'abortion'; 3 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/logolarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/logolarge.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/logothin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/logothin.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/thumbnail.png -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/people/kjfeng.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/people/kjfeng.jpg -------------------------------------------------------------------------------- /projects/deliberation_at_scale/documentation/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/documentation/images/logo.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/locales.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | defaultLocale: "en", 3 | locales: [ 4 | "en", 5 | "nl" 6 | ] 7 | }; 8 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/people/icheon.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/people/icheon.webp -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useWhisper/index.ts: -------------------------------------------------------------------------------- 1 | import { useWhisper } from './useWhisper'; 2 | 3 | export { useWhisper }; 4 | export default useWhisper; 5 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/locales.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | defaultLocale: "en", 3 | locales: [ 4 | "en", 5 | "nl" 6 | ] 7 | }; 8 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/room/[roomId]/page.tsx: -------------------------------------------------------------------------------- 1 | // import AI from './ai/page'; 2 | import Compact from './compact/page'; 3 | 4 | export default Compact; 5 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230921165224_prolific_signup_type/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "signupType" TEXT NOT NULL DEFAULT 'EMAIL'; 3 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/EnergizeLogoFull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/EnergizeLogoFull.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon.ico -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/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" -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/EnergizeLogoGraphic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/EnergizeLogoGraphic.png -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/pubs/phase_1_blog_post.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/pubs/phase_1_blog_post.pdf -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/images/logo.png -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230907183710_multi_case_chats/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "case" TEXT NOT NULL DEFAULT 'christian_girl_abortion'; 3 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/pubs/mp2_workshop_case_law.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/case_law_for_ai_policy/docs/assets/pubs/mp2_workshop_case_law.pdf -------------------------------------------------------------------------------- /projects/collective_dialogues_for_democratic_input/img/process-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/collective_dialogues_for_democratic_input/img/process-diagram.png -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/jest.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | preset: "ts-jest", 3 | testEnvironment: "node", 4 | moduleNameMapper: { 5 | "^~/(.*)$": "/app/$1", 6 | }, 7 | } 8 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230821182232_/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "provisionalCanonicalCard" JSONB, 3 | ADD COLUMN "provisionalCard" JSONB; 4 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230914141420_add_run_id_to_edge_hypothesis/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "EdgeHypothesis" ADD COLUMN "runId" TEXT NOT NULL DEFAULT 'OLD'; 3 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/images/wordmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/images/wordmark.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/src/tasks/reschedule.ts: -------------------------------------------------------------------------------- 1 | import { startScheduler } from "../scheduler"; 2 | 3 | export default async function reschedule() { 4 | startScheduler(); 5 | } 6 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/welcome/globe1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/welcome/globe1.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/welcome/rate2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/welcome/rate2.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0032_plain_sway.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "opinionOptionType" ADD VALUE 'maybe'; 2 | DROP TABLE "cross_pollinations" CASCADE;--> statement-breakpoint 3 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "fgdai-1ee33", 4 | "staging": "fgdaidev" 5 | }, 6 | "targets": {}, 7 | "etags": {} 8 | } -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/chat.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/rate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/rate.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/topic.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/index.ts: -------------------------------------------------------------------------------- 1 | import './config/constants'; 2 | import { startVoyagerServer } from "./servers/voyager"; 3 | 4 | (async () => { 5 | startVoyagerServer(); 6 | })(); 7 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/abstract.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/abstract.jpg -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/propose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/propose.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/democratic-inputs-to-ai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/democratic-inputs-to-ai.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon_io/favicon-16x16.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon_io/favicon-32x32.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/images/wordmark-bg-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/images/wordmark-bg-white.png -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/LikertScale/index.ts: -------------------------------------------------------------------------------- 1 | export * from './LikertScaleQuestion' 2 | export * from './LikertScaleSurvey' 3 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/src/utilities/time.ts: -------------------------------------------------------------------------------- 1 | export async function waitFor(timeoutMs: number) { 2 | return new Promise((resolve) => { 3 | setTimeout(resolve, timeoutMs); 4 | }); 5 | } 6 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | trim_trailing_whitespace = true 7 | charset = utf-8 8 | indent_style = space 9 | indent_size = 4 10 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0016_short_bill_hollister.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "roomStatusType" ADD VALUE 'topic_intro';--> statement-breakpoint 2 | ALTER TYPE "roomStatusType" ADD VALUE 'close'; 3 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon_io/apple-touch-icon.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/needs-your-help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Aligned-Platform-EnergizeAI/app/public/images/blogs/howitworks/needs-your-help.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0002_talented_crusher_hogan.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "moderationType" ADD VALUE 'unequal';--> statement-breakpoint 2 | ALTER TYPE "moderationType" ADD VALUE 'clarification'; 3 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0007_lean_mantis.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "rooms" ALTER COLUMN "starts_at" DROP DEFAULT;--> statement-breakpoint 2 | ALTER TABLE "rooms" ALTER COLUMN "starts_at" DROP NOT NULL; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/documentation/images/confirm-email-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/documentation/images/confirm-email-off.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/documentation/images/entity-impression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/data-core/documentation/images/entity-impression.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon_io/android-chrome-192x192.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/public/favicon_io/android-chrome-512x512.png -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230914155552_add_relationship_and_comment_to_edges/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Edge" ADD COLUMN "comment" TEXT, 3 | ADD COLUMN "relationship" TEXT NOT NULL DEFAULT 'upgrade'; 4 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0014_tired_whiplash.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "moderations" ADD COLUMN "job_key" text;--> statement-breakpoint 2 | CREATE INDEX IF NOT EXISTS "job_key_index" ON "moderations" ("job_key"); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0039_clean_black_widow.sql: -------------------------------------------------------------------------------- 1 | DO $$ BEGIN 2 | CREATE TYPE "helpRequestType" AS ENUM('facilitator', 'technician'); 3 | EXCEPTION 4 | WHEN duplicate_object THEN null; 5 | END $$; 6 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230919094955_save_story_and_run_id_to_edges/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Edge" ADD COLUMN "runId" TEXT NOT NULL DEFAULT 'OLD', 3 | ADD COLUMN "story" TEXT NOT NULL DEFAULT 'OLD'; 4 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230921124654_add_prolific_information_to_user/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "User" ADD COLUMN "prolificId" TEXT, 3 | ADD COLUMN "sessionId" TEXT, 4 | ADD COLUMN "studyId" TEXT; 5 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Providers/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Web3AuthProvider } from './Web3AuthProvider' 2 | export * from './Web3AuthProvider' 3 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 4 | 5 | const AspectRatio = AspectRatioPrimitive.Root 6 | 7 | export { AspectRatio } 8 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/login/page.tsx: -------------------------------------------------------------------------------- 1 | import LoginChatFlow from '@/components/ChatFlow/LoginChatFlow'; 2 | 3 | export default async function Login() { 4 | return ( 5 | 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/documentation/images/basic-prototype-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/deliberation_at_scale/packages/frontend/documentation/images/basic-prototype-overview.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/.env.example: -------------------------------------------------------------------------------- 1 | SUPABASE_URL= 2 | SUPABASE_KEY= 3 | OPENAI_API_KEY= 4 | DATABASE_URL= 5 | SUPABASE_PROJECT_ID= 6 | SENTRY_DSN= 7 | WHEREBY_BEARER_TOKEN= 8 | VPS_HOST_NAME= 9 | LANGUAGE_LOCALE= 10 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | export * from '@/layouts/BodyLayout' 2 | export * from '@/layouts/MainLayout' 3 | export * from '@/layouts/Web3AuthGatedLayout' 4 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.env: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_Y2xlcmsuZW5lcmdpemUuYWkk 2 | 3 | ENERGIZE_ENGINE=api.energize.ai 4 | NEXT_PUBLIC_ENERGIZE_ENGINE=api.energize.ai 5 | 6 | NEXT_PUBLIC_ENERGIZE_ENGINE_KEY= 7 | ENERGIZE_ENGINE_KEY= -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/register/page.tsx: -------------------------------------------------------------------------------- 1 | import RegisterChatFlow from '@/components/ChatFlow/RegisterChatFlow'; 2 | 3 | export default async function Join() { 4 | return ( 5 | 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/bat.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/camel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/camel.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/crow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/crow.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dingo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dingo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/duck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/duck.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/fox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/fox.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/frog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/frog.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hippo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hippo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hyena.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hyena.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ibex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ibex.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ifrit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ifrit.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/koala.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/koala.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/lemur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/lemur.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/liger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/liger.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/llama.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/llama.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/logo1.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/logo2.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/mink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/mink.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/moose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/moose.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/otter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/otter.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/panda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/panda.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/rhino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/rhino.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/sheep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/sheep.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/shrew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/shrew.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/skunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/skunk.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wolf.png -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230810112613_vectors/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "CanonicalValuesCard" ADD COLUMN "embedding" vector(1536); 3 | 4 | -- AlterTable 5 | ALTER TABLE "ValuesCard" ADD COLUMN "embedding" vector(1536); 6 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/auroch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/auroch.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/axolotl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/axolotl.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/badger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/badger.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/beaver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/beaver.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/buffalo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/buffalo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/cheetah.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/cheetah.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/coyote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/coyote.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dolphin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dolphin.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dragon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dragon.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ferret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/ferret.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/giraffe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/giraffe.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/gopher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/gopher.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/grizzly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/grizzly.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/iguana.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/iguana.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/jackal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/jackal.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/kraken.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/kraken.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/leopard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/leopard.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/manatee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/manatee.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/monkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/monkey.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/narwhal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/narwhal.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/nyancat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/nyancat.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/penguin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/penguin.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/pumpkin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/pumpkin.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/python.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/quagga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/quagga.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/rabbit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/rabbit.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/raccoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/raccoon.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/turtle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/turtle.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/walrus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/walrus.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wombat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wombat.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/login.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0010_black_toad.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX IF NOT EXISTS "status_index" ON "participants" ("status");--> statement-breakpoint 2 | CREATE INDEX IF NOT EXISTS "last_seen_at_index" ON "participants" ("last_seen_at"); -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/alligator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/alligator.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/anteater.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/anteater.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/armadillo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/armadillo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/capybara.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/capybara.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chameleon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chameleon.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chinchilla.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chinchilla.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chipmunk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chipmunk.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chupacabra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/chupacabra.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/cormorant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/cormorant.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dinosaur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/dinosaur.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/elephant.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/elephant.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hedgehog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/hedgehog.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/kangaroo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/kangaroo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/orangutan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/orangutan.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/platypus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/platypus.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/slowloris.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/slowloris.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/squirrel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/squirrel.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wolverine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/wolverine.png -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/main-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/main-page.png -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/register.png -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@chakra-ui/icons": "^2.1.0", 4 | "@chakra-ui/react": "^2.8.0", 5 | "date-fns": "^2.30.0", 6 | "react-router-dom": "^6.14.2" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | tab_width = 2 10 | indent_size = 2 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/.env.example: -------------------------------------------------------------------------------- 1 | DEBUG=* 2 | DATABASE_URL= 3 | GRAPHQL_URL= 4 | SUPABASE_URL= 5 | SUPABASE_PROJECT_ID= 6 | SUPABASE_ANONYMOUS_API_KEY= 7 | SUPABASE_SERVICE_API_KEY= 8 | SUPABASE_ACCESS_TOKEN= 9 | VOYAGER_SERVER_PORT=3201 10 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/after-login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/after-login.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/lib/spaces.ts: -------------------------------------------------------------------------------- 1 | export const DEFAULT_SPACE_ID = 2 | process.env.NEXT_PUBLIC_VERCEL_ENV === "production" || process.env.VERCEL_ENV === "production" 3 | ? "62b65e6c-2f50-4ff8-a7c6-b510ae069b30" 4 | : "2345151e-b4b6-45fd-8962-ac9159e27edf" 5 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/create-new-post.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/public/create-new-post.png -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }) 8 | -------------------------------------------------------------------------------- /projects/collective_dialogues_for_democratic_input/experiments/medical advice/CD3 - med/Policy eval - med.textClipping: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/collective_dialogues_for_democratic_input/experiments/medical advice/CD3 - med/Policy eval - med.textClipping -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/edge-functions/.env.example: -------------------------------------------------------------------------------- 1 | OPENAI_API_KEY= 2 | DEEPGRAM_API_KEY= 3 | WHISPER_API_URL=https://api.openai.com/v1/audio 4 | DEEPGRAM_API_URL=https://api.deepgram.com/v1/listen 5 | SUPABASE_PROJECT_ID=zunbekpaeiipejmicjme 6 | APP_URL=http://localhost:3200/ 7 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/UpdateDemographics.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateDemographics($userId: UUID!, $demographics: JSON) { 2 | updateusersCollection(filter: { id: { eq: $userId } }, set: { demographics: $demographics }) { 3 | affectedCount 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/login/anonymous/page.tsx: -------------------------------------------------------------------------------- 1 | import AnonymousLoginChatFlow from '@/components/ChatFlow/AnonymousLoginChatFlow'; 2 | 3 | export default async function AnonymousLogin() { 4 | return ( 5 | 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230920144749_add_condition_to_edge_and_edge_hypothesis/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Edge" ADD COLUMN "condition" TEXT NOT NULL DEFAULT 'OLD'; 3 | 4 | -- AlterTable 5 | ALTER TABLE "EdgeHypothesis" ADD COLUMN "condition" TEXT; 6 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/all_namespaces/all_kinds/output-0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/all_namespaces/all_kinds/output-0 -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/fragments/FullParticipant.graphql: -------------------------------------------------------------------------------- 1 | fragment FullParticipant on participants { 2 | id 3 | active 4 | room_id 5 | user_id 6 | nick_name 7 | participation_score 8 | created_at 9 | updated_at 10 | status 11 | last_seen_at 12 | } 13 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/edge-functions/supabase/functions/import_map.json: -------------------------------------------------------------------------------- 1 | { 2 | "imports": { 3 | "openai": "https://esm.sh/openai@3.1.0", 4 | "@supabase/supabase-js": "https://esm.sh/@supabase/supabase-js@2.36.0", 5 | "dayjs": "https://esm.sh/dayjs@1.11.10" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230922093003_add_case_id_to_votes_and_impressions/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Impression" ADD COLUMN "caseId" TEXT NOT NULL DEFAULT 'abortion'; 3 | 4 | -- AlterTable 5 | ALTER TABLE "Vote" ADD COLUMN "caseId" TEXT NOT NULL DEFAULT 'abortion'; 6 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/VoteStats/index.ts: -------------------------------------------------------------------------------- 1 | export * from './BorderedLinearProgress' 2 | export * from './Choice' 3 | export * from './ChoiceTopVoters' 4 | export * from './VotesChart' 5 | export * from './VoteStats' 6 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/firestore_export.overall_export_metadata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/firestore_export.overall_export_metadata -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/fragments/FullOpinion.graphql: -------------------------------------------------------------------------------- 1 | fragment FullOpinion on opinions { 2 | id 3 | active 4 | type 5 | outcome_id 6 | participant_id 7 | range_value 8 | statement 9 | option_type 10 | created_at 11 | updated_at 12 | } 13 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/btn_google_signin_dark_pressed_web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/public/static/images/btn_google_signin_dark_pressed_web.png -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/loading-page.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from "@/components/ui/spinner" 2 | 3 | export const LoadingPage = () => { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ className, ...props }: React.HTMLAttributes) { 4 | return
5 | } 6 | 7 | export { Skeleton } 8 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/interactive/backend/server.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, jsonify, request 2 | 3 | app = Flask(__name__) 4 | 5 | @app.route('/', methods = ['GET']) 6 | def main(): 7 | return jsonify({'status': 'up'}) 8 | 9 | if __name__ == '__main__': 10 | import dotenv 11 | app.run(debug = True) 12 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": ["next/core-web-vitals", "prettier"], 4 | "overrides": [ 5 | { 6 | "files": ["*.js"], 7 | "parser": "espree", 8 | "parserOptions": { 9 | "ecmaVersion": 2020 10 | } 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0008_sloppy_the_order.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "completionType" ADD VALUE 'gpt';--> statement-breakpoint 2 | ALTER TABLE "completions" ALTER COLUMN "target_type" DROP NOT NULL;--> statement-breakpoint 3 | ALTER TABLE "moderations" ALTER COLUMN "target_type" DROP NOT NULL; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | extends: [ 3 | '../../.eslintrc.js', 4 | 'next/core-web-vitals', 5 | ], 6 | rules: { 7 | "@next/next/no-img-element": "off", 8 | "@typescript-eslint/no-explicit-any": "off" 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useWhisper/lamejs.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'lamejs' { 2 | type Encoder = { 3 | encodeBuffer: (left: Int16Array, right?: Int16Array) => Int8Array 4 | flush: () => Int8Array 5 | } 6 | function Mp3Encoder(channels: 1 | 2, samplerate: number, kbps: number): void 7 | } 8 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/lobby/idle/page.tsx: -------------------------------------------------------------------------------- 1 | import IdleChatFlow from '@/components/ChatFlow/IdleChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Idle() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/lobby/page.tsx: -------------------------------------------------------------------------------- 1 | import LobbyChatFlow from '@/components/ChatFlow/LobbyChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Lobby() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | experimental: { 4 | serverActions: true, 5 | swcPlugins: [ 6 | ["@lingui/swc-plugin", {}] 7 | ] 8 | }, 9 | }; 10 | 11 | module.exports = nextConfig; 12 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/PingParticipant.graphql: -------------------------------------------------------------------------------- 1 | 2 | mutation PingParticipant($participantId: UUID!, $lastSeenAt: Datetime!) { 3 | updateparticipantsCollection(filter: {id: {eq: $participantId}, active: {eq: true}}, set: {last_seen_at: $lastSeenAt}) { 4 | affectedCount 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0029_open_cerise.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "messages" RENAME COLUMN "bad_language" TO "safe_language";--> statement-breakpoint 2 | DROP INDEX IF EXISTS "bad_language_index";--> statement-breakpoint 3 | CREATE INDEX IF NOT EXISTS "safe_language_index" ON "messages" ("safe_language"); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/public/favicon_io/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/public/fonts/Inter-roman.var.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/public/fonts/Inter-roman.var.woff2 -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/assets/images/chat-gpt-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/assets/images/chat-gpt-logo.png -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0006_cynical_alex_wilder.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "rooms" RENAME COLUMN "room_status_type" TO "status_type";--> statement-breakpoint 2 | DROP INDEX IF EXISTS "status_type_index";--> statement-breakpoint 3 | CREATE INDEX IF NOT EXISTS "status_type_index" ON "rooms" ("status_type"); 4 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/lobby/invalid/page.tsx: -------------------------------------------------------------------------------- 1 | import InvalidChatFlow from '@/components/ChatFlow/InvalidChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Idle() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/profile/page.tsx: -------------------------------------------------------------------------------- 1 | import ProfileChatFlow from '@/components/ChatFlow/ProfileChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Profile() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0021_flaky_secret_warriors.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "opinionType" ADD VALUE 'option';--> statement-breakpoint 2 | ALTER TABLE "opinions" ADD COLUMN "option_name" text DEFAULT '' NOT NULL;--> statement-breakpoint 3 | CREATE INDEX IF NOT EXISTS "option_name_index" ON "opinions" ("option_name"); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/README.md: -------------------------------------------------------------------------------- 1 | # Orchestrator 2 | The orchestrator is used to manage back-end tasks and cron jobs. 3 | 4 | ## Setup 5 | To setup .env.example can be copied to .env and the individual fields should be filled in. The copy will happen automatically when the setup function is run. 6 | 7 | ## Running 8 | 9 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/pages/account/demographics.tsx: -------------------------------------------------------------------------------- 1 | import { AccountLayout } from "@/components/account/layout" 2 | import { DemoForm } from "@/components/users/demo-form" 3 | 4 | export default function Demographics() { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/evaluate/[roomId]/page.tsx: -------------------------------------------------------------------------------- 1 | import EvaluateChatFlow from '@/components/ChatFlow/EvaluateChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Lobby() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/pages/account/profile.tsx: -------------------------------------------------------------------------------- 1 | import { AccountLayout } from "@/components/account/layout" 2 | import { MyProfile } from "@/components/account/tabs/my-profile" 3 | 4 | export default function MyRankingsPage() { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/__Template.tsx: -------------------------------------------------------------------------------- 1 | interface Props { 2 | children: React.ReactNode; 3 | } 4 | 5 | export default function Template(props: Props) { 6 | const { children } = props; 7 | 8 | return ( 9 |
10 | {children} 11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230908081258_rename_case/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `case` on the `Chat` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Chat" DROP COLUMN "case", 9 | ADD COLUMN "caseId" TEXT NOT NULL DEFAULT 'abortion'; 10 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/assets/images/dalle-nurse-helping-ceo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/assets/images/dalle-nurse-helping-ceo.png -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openai/democratic-inputs/HEAD/projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "style": "default", 3 | "tailwind": { 4 | "config": "tailwind.config.js", 5 | "css": "src/styles/globals.css", 6 | "baseColor": "slate", 7 | "cssVariables": true 8 | }, 9 | "aliases": { 10 | "components": "@/components", 11 | "utils": "@/lib/utils" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/lobby/permission/page.tsx: -------------------------------------------------------------------------------- 1 | import PermissionChatFlow from '@/components/ChatFlow/PermissionChatFlow'; 2 | import useAuth from '@/hooks/useAuth'; 3 | 4 | export default async function Permission() { 5 | await useAuth(); 6 | 7 | return ( 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/utilities/text.ts: -------------------------------------------------------------------------------- 1 | export const replaceTextVariables = (text: string, replacements: Record) => { 2 | let newText = text; 3 | 4 | for (const [key, value] of Object.entries(replacements)) { 5 | newText = newText.replace(`[${key}]`, value); 6 | } 7 | 8 | return newText; 9 | }; 10 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230911150601_on_delete_cascade_for_values_cards/migration.sql: -------------------------------------------------------------------------------- 1 | -- DropForeignKey 2 | ALTER TABLE "ValuesCard" DROP CONSTRAINT "ValuesCard_chatId_fkey"; 3 | 4 | -- AddForeignKey 5 | ALTER TABLE "ValuesCard" ADD CONSTRAINT "ValuesCard_chatId_fkey" FOREIGN KEY ("chatId") REFERENCES "Chat"("id") ON DELETE CASCADE ON UPDATE CASCADE; 6 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "tabWidth": 2, 3 | "useTabs": false, 4 | "semi": false, 5 | "plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"], 6 | "importOrder": ["[^\\s]/(.*)$", "^[./]"], 7 | "importOrderSeparation": true, 8 | "importOrderSortSpecifiers": true, 9 | "printWidth": 120 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/Divider.tsx: -------------------------------------------------------------------------------- 1 | import { motion } from 'framer-motion'; 2 | 3 | export default function Divider() { 4 | // TODO: expand divider to subtle white fade 5 | return ( 6 | 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/utilities/sleep.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Async func that can be awaited to create intervals between events. 3 | * @param timeoutMs: number in ms to wait before returning promise 4 | * @returns Promise (void) 5 | */ 6 | export default function sleep(timeoutMs: number) { 7 | return new Promise((resolve) => setTimeout(resolve, timeoutMs)); 8 | } 9 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/main.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import "react-app-polyfill/stable"; 3 | import ReactDOM from "react-dom/client"; 4 | import App from "./App"; 5 | ReactDOM.createRoot(document.getElementById("root")).render( 6 | 7 | 8 | 9 | ); 10 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/CreateParticipant.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateParticipant($userId: UUID!, $nickName: String) { 2 | insertIntoparticipantsCollection(objects: { 3 | user_id: $userId, 4 | nick_name: $nickName, 5 | status: queued 6 | }) { 7 | records { 8 | id 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetRoomParticipants.graphql: -------------------------------------------------------------------------------- 1 | query GetRoomParticipants($roomId: UUID!) { 2 | # also fetch inactive participants so we can check if the room is still valid! 3 | participantsCollection(filter: { room_id: { eq: $roomId } }) { 4 | edges { 5 | node { 6 | ...FullParticipant 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Chat/index.ts: -------------------------------------------------------------------------------- 1 | export * from './AiChatBox' 2 | export * from './ChatMessage' 3 | export * from './ChatSideIconButton' 4 | export * from './MessageBoxScrollDownButton' 5 | export * from './MessageStack' 6 | export * from './PromptSuggestion' 7 | export * from './SocketChatBox' 8 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230824075024_chat_metadata/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "articulatorModel" TEXT NOT NULL DEFAULT 'gpt-4-0613', 3 | ADD COLUMN "articulatorPromptHash" TEXT NOT NULL DEFAULT 'OLD', 4 | ADD COLUMN "articulatorPromptVersion" TEXT NOT NULL DEFAULT 'OLD', 5 | ADD COLUMN "gitCommitHash" TEXT NOT NULL DEFAULT 'OLD'; 6 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/tests/transcripts/no_function_call.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "role": "user", 4 | "content": "She should do what is right to do as a christian." 5 | }, 6 | { "role": "assistant", "content": "What is right to do as a christian?" }, 7 | { 8 | "role": "user", 9 | "content": "Following the teachings of our lord and saviour jesus christ." 10 | } 11 | ] 12 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/seed/firebase-export-metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "12.5.4", 3 | "firestore": { 4 | "version": "1.18.2", 5 | "path": "firestore_export", 6 | "metadata_file": "firestore_export/firestore_export.overall_export_metadata" 7 | }, 8 | "auth": { 9 | "version": "12.5.4", 10 | "path": "auth_export" 11 | } 12 | } -------------------------------------------------------------------------------- /projects/deliberation_at_scale/nx.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/nx/schemas/nx-schema.json", 3 | "extends": "nx/presets/npm.json", 4 | "tasksRunnerOptions": { 5 | "default": { 6 | "runner": "nx/tasks-runners/default", 7 | "options": { 8 | "cacheableOperations": [] 9 | } 10 | } 11 | }, 12 | "affected": { 13 | "defaultBase": "main" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/hooks/useWeb3Auth.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react' 2 | 3 | import { 4 | Web3AuthProviderContext, 5 | Web3AuthProviderData, 6 | } from '@/components/Providers/Web3AuthProvider' 7 | 8 | export const useWeb3Auth = () => 9 | useContext(Web3AuthProviderContext) 10 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230731144307_rm_constraint/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `userId` on the `ValuesCard` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "ValuesCard" DROP CONSTRAINT "ValuesCard_userId_fkey"; 9 | 10 | -- AlterTable 11 | ALTER TABLE "ValuesCard" DROP COLUMN "userId"; 12 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/redirect.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "react" 2 | 3 | import { useRouter } from "next/router" 4 | 5 | type Props = { 6 | redirectTo: string 7 | } 8 | 9 | export const Redirect = ({ redirectTo }: Props) => { 10 | const router = useRouter() 11 | 12 | useEffect(() => { 13 | router.push(redirectTo) 14 | }, []) 15 | 16 | return null 17 | } 18 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetTopics.graphql: -------------------------------------------------------------------------------- 1 | fragment FullTopic on topics { 2 | id 3 | active 4 | type 5 | content 6 | original_topic_id 7 | updated_at 8 | created_at 9 | } 10 | 11 | query GetTopics { 12 | topicsCollection(filter: { active: { eq: true } }) { 13 | edges { 14 | node { 15 | ...FullTopic 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/pages/spaces/[space_id]/export.tsx: -------------------------------------------------------------------------------- 1 | import { ExportForm } from "@/components/spaces/export/export-form" 2 | import { OrgAdminLayout } from "@/components/spaces/settings/space-admin-layout" 3 | 4 | const OrgExportPage = () => { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | 12 | export default OrgExportPage 13 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/drizzle.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "drizzle-kit"; 2 | 3 | import { DATABASE_URL } from "./src/config/constants"; 4 | 5 | export default { 6 | schema: "./src/database/schema.ts", 7 | out: "./src/database/migrations", 8 | driver: "pg", 9 | dbCredentials: { 10 | connectionString: DATABASE_URL, 11 | }, 12 | } satisfies Config; 13 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/config/constants.ts: -------------------------------------------------------------------------------- 1 | import 'dotenv/config'; 2 | 3 | // export the constants with default values 4 | export const { 5 | DATABASE_URL = '', 6 | GRAPHQL_URL = '', 7 | SUPABASE_URL = '', 8 | SUPABASE_PROJECT_ID = '', 9 | SUPABASE_ANONYMOUS_API_KEY = '', 10 | SUPABASE_SERVICE_API_KEY = '', 11 | VOYAGER_SERVER_PORT = 3201, 12 | } = process.env; 13 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0038_whole_lila_cheney.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "help_requests" ADD COLUMN "room_id" uuid;--> statement-breakpoint 2 | DO $$ BEGIN 3 | ALTER TABLE "help_requests" ADD CONSTRAINT "help_requests_room_id_rooms_id_fk" FOREIGN KEY ("room_id") REFERENCES "rooms"("id") ON DELETE no action ON UPDATE no action; 4 | EXCEPTION 5 | WHEN duplicate_object THEN null; 6 | END $$; 7 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/types/waitlist-types.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | 3 | export const waitlistFormSchema = z.object({ 4 | firstName: z.string().nonempty({ message: "Please enter your first name" }), 5 | lastName: z.string().nonempty({ message: "Please enter your last name" }), 6 | email: z.string().email({ message: "Please enter a valid email" }), 7 | questionAnswer: z.string().optional(), 8 | }) 9 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/components/layout/index.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import Footer from "./Footer"; 3 | import Navbar from "./Navbar"; 4 | import PostList from "./PostList"; 5 | 6 | export default function Home() { 7 | return ( 8 |
9 | 10 | 11 |
12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useLanguage.ts: -------------------------------------------------------------------------------- 1 | import { DEFAULT_LANGUAGE, ENABLE_FORCE_LANGUAGE, FORCED_LANGUAGE } from "@/utilities/constants"; 2 | import { useParams } from "next/navigation"; 3 | 4 | export function useLanguage() { 5 | const params = useParams(); 6 | const language = ENABLE_FORCE_LANGUAGE ? FORCED_LANGUAGE : params?.lang ?? DEFAULT_LANGUAGE; 7 | 8 | return language; 9 | } 10 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/hooks/user.js: -------------------------------------------------------------------------------- 1 | import { doc, query } from "firebase/firestore"; 2 | import { useDocumentData } from "react-firebase-hooks/firestore"; 3 | import { db } from "../lib/firebase"; 4 | 5 | export function useUser(id) { 6 | const q = query(doc(db, "users", id)); 7 | const [user, isLoading] = useDocumentData(q); 8 | return { user, isLoading }; 9 | } -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/CreateHelpRequest.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateHelpRequest($participantId: UUID!, $roomId: UUID!, $type: helpRequestType!, $externalRoomUrl: String!) { 2 | insertIntohelp_requestsCollection(objects: { 3 | participant_id: $participantId 4 | room_id: $roomId 5 | type: $type 6 | external_room_url: $externalRoomUrl 7 | }) { 8 | affectedCount 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { ThemeProvider as NextThemesProvider } from "next-themes" 4 | import * as React from "react" 5 | 6 | import type { ThemeProviderProps } from "next-themes/dist/types" 7 | 8 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetRoomOutcomes.graphql: -------------------------------------------------------------------------------- 1 | query GetRoomOutcomes($roomId: UUID) { 2 | outcomesCollection( 3 | filter: { 4 | active: { eq: true }, 5 | room_id: { eq: $roomId }, 6 | } 7 | orderBy: { 8 | created_at: DescNullsLast 9 | } 10 | ) { 11 | edges { 12 | node { 13 | ...FullOutcome 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230907100156_chats_copy_functionality/migration.sql: -------------------------------------------------------------------------------- 1 | -- AlterTable 2 | ALTER TABLE "Chat" ADD COLUMN "copiedFromId" TEXT; 3 | 4 | -- AlterTable 5 | ALTER TABLE "User" ADD COLUMN "isAdmin" BOOLEAN NOT NULL DEFAULT false; 6 | 7 | -- AddForeignKey 8 | ALTER TABLE "Chat" ADD CONSTRAINT "Chat_copiedFromId_fkey" FOREIGN KEY ("copiedFromId") REFERENCES "Chat"("id") ON DELETE CASCADE ON UPDATE CASCADE; 9 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 4 | 5 | const Collapsible = CollapsiblePrimitive.Root 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 12 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0028_shiny_roulette.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "messages" ADD COLUMN "bad_language" boolean;--> statement-breakpoint 2 | ALTER TABLE "messages" ADD COLUMN "easy_language" boolean;--> statement-breakpoint 3 | CREATE INDEX IF NOT EXISTS "bad_language_index" ON "messages" ("bad_language");--> statement-breakpoint 4 | CREATE INDEX IF NOT EXISTS "easy_language_index" ON "messages" ("easy_language"); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/utilities/loadCatalog.ts: -------------------------------------------------------------------------------- 1 | import type { Messages } from '@lingui/core'; 2 | 3 | /** 4 | * Load a language catalog for a particular locale, and return the messages that 5 | * are in the catalog. 6 | */ 7 | export default async function loadCatalog(locale: string) { 8 | const catalog = await import(`@lingui/loader!../locales/${locale}.po`); 9 | return catalog.messages as Messages; 10 | } 11 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230919132258_drop_unnecessary_column_on_chat/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `canonicalValuesCardId` on the `Chat` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- DropForeignKey 8 | ALTER TABLE "Chat" DROP CONSTRAINT "Chat_canonicalValuesCardId_fkey"; 9 | 10 | -- AlterTable 11 | ALTER TABLE "Chat" DROP COLUMN "canonicalValuesCardId"; 12 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/data-table-date-cell.tsx: -------------------------------------------------------------------------------- 1 | type Props = { 2 | date: Date | null 3 | } 4 | 5 | export const DataTableDateCell = ({ date }: Props) => { 6 | if (!date) return null 7 | const formattedDate = date.toLocaleDateString("en-US", { 8 | month: "short", 9 | day: "numeric", 10 | year: "numeric", 11 | }) 12 | 13 | return {formattedDate} 14 | } 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/src/utilities/participants.ts: -------------------------------------------------------------------------------- 1 | import { supabaseClient } from "../lib/supabase"; 2 | 3 | export async function getParticipantsByRoomId(roomId: string) { 4 | const participantsData = await supabaseClient 5 | .from("participants") 6 | .select() 7 | .eq("room_id", roomId); 8 | 9 | const participants = participantsData?.data ?? []; 10 | 11 | return participants; 12 | } 13 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/playground/constitution.active-gradient.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | export const ConstitutionActiveGradient = () => { 4 | return ( 5 |
12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/UpdateNickName.graphql: -------------------------------------------------------------------------------- 1 | mutation UpdateNickName($userId: UUID!, $nickName: String!) { 2 | updateusersCollection( 3 | filter: { 4 | id: { eq: $userId }, 5 | }, 6 | set: { 7 | nick_name: $nickName 8 | } 9 | ) { 10 | affectedCount 11 | records { 12 | id 13 | nick_name 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230922083205_drop_unnecessary_prolific_columns/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `sessionId` on the `User` table. All the data in the column will be lost. 5 | - You are about to drop the column `studyId` on the `User` table. All the data in the column will be lost. 6 | 7 | */ 8 | -- AlterTable 9 | ALTER TABLE "User" DROP COLUMN "sessionId", 10 | DROP COLUMN "studyId"; 11 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './chat' 2 | export * from './pod' 3 | export * from './profile' 4 | export * from './snapshot' 5 | export * from './user' 6 | 7 | export type ChatDialogue = { 8 | // id: number 9 | role: 'user' | 'system' | 'assistant' 10 | content: string 11 | createdAt: number 12 | replyTo?: number 13 | tag?: string 14 | } 15 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_FIREBASE_API_KEY="" 2 | NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="" 3 | NEXT_PUBLIC_FIREBASE_DATABASE_URL="" 4 | NEXT_PUBLIC_FIREBASE_PROJECT_ID="" 5 | NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET="" 6 | NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="" 7 | NEXT_PUBLIC_FIREBASE_APP_ID="" 8 | NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID="" 9 | NEXT_PUBLIC_APP_TITLE="FGD Ai" 10 | NEXT_PUBLIC_TOPIC="" -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/types/data-table-types.ts: -------------------------------------------------------------------------------- 1 | import { Row, Table } from "@tanstack/react-table" 2 | 3 | export interface DataTableToolbarProps { 4 | table: Table 5 | } 6 | 7 | export type MobileRowProps = { 8 | row: Row 9 | handleRowClick?: (row: TData) => void 10 | } 11 | 12 | export type DataTableData = 13 | | TData[] 14 | | { 15 | items: TData[] 16 | total: number 17 | } 18 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/utils/isUsernameExists.js: -------------------------------------------------------------------------------- 1 | import { query, collection, where, getDocs } from "firebase/firestore"; 2 | import { db } from "../lib/firebase"; 3 | 4 | export default async function isUsernameExists(username) { 5 | const q = query(collection(db, "users"), where("username", "==", username)); 6 | const querySnapshot = await getDocs(q); 7 | return querySnapshot.size > 0; 8 | } -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/supabase.ts: -------------------------------------------------------------------------------- 1 | import { NEXT_PUBLIC_SUPABASE_URL, NEXT_PUBLIC_SUPABASE_ANON_KEY } from '../utilities/constants'; 2 | import { Database } from '@/types/database'; 3 | import { createClientComponentClient } from '@supabase/auth-helpers-nextjs'; 4 | 5 | export const supabaseClient = createClientComponentClient({ 6 | supabaseKey: NEXT_PUBLIC_SUPABASE_ANON_KEY, 7 | supabaseUrl: NEXT_PUBLIC_SUPABASE_URL, 8 | }); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetUser.graphql: -------------------------------------------------------------------------------- 1 | fragment FullUser on users { 2 | id 3 | active 4 | nick_name 5 | demographics 6 | auth_user_id 7 | updated_at 8 | created_at 9 | } 10 | 11 | query GetUser($authUserId: UUID!) { 12 | usersCollection(filter: { active: { eq: true }, auth_user_id: { eq: $authUserId } }, first: 1) { 13 | edges { 14 | node { 15 | ...FullUser 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/layouts/MainLayout.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | 3 | export function MainLayout({ children }: React.PropsWithChildren) { 4 | return ( 5 | 13 | {children} 14 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useWhisper/configs.ts: -------------------------------------------------------------------------------- 1 | export const defaultStopTimeout = 5_000; 2 | 3 | export const ffmpegCoreUrl = 4 | 'https://unpkg.com/@ffmpeg/core-st@0.11.1/dist/ffmpeg-core.js'; 5 | 6 | export const silenceRemoveCommand = 7 | 'silenceremove=start_periods=1:stop_periods=-1:start_threshold=-30dB:stop_threshold=-30dB:start_silence=2:stop_silence=2'; 8 | 9 | export const whisperApiEndpoint = 'https://api.openai.com/v1/audio/'; 10 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/fragments/FullOutcome.graphql: -------------------------------------------------------------------------------- 1 | fragment FullOutcome on outcomes { 2 | id 3 | active 4 | type 5 | room_id 6 | topic_id 7 | original_outcome_id 8 | content 9 | created_at 10 | updated_at 11 | 12 | opinionsCollection(orderBy: { created_at: DescNullsLast }, filter: { active: { eq: true } }) { 13 | edges { 14 | node { 15 | ...FullOpinion 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/LeaveRoom.graphql: -------------------------------------------------------------------------------- 1 | mutation LeaveRoom($participantId: UUID!) { 2 | updateparticipantsCollection( 3 | filter: { 4 | id: { eq: $participantId }, 5 | }, 6 | set: { 7 | status: end_of_session 8 | } 9 | ) { 10 | affectedCount 11 | records { 12 | id 13 | status 14 | room_id 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/src/App.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import {ChakraProvider} from "@chakra-ui/react"; 3 | import "./App.css"; 4 | import {RouterProvider} from "react-router-dom"; 5 | import {router} from "./lib/routes"; 6 | function App() { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | } 13 | 14 | export default App; 15 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230811132015_rename_options_to_draw/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `options` on the `Vote` table. All the data in the column will be lost. 5 | - Added the required column `draw` to the `Vote` table without a default value. This is not possible if the table is not empty. 6 | 7 | */ 8 | -- AlterTable 9 | ALTER TABLE "Vote" DROP COLUMN "options", 10 | ADD COLUMN "draw" JSONB NOT NULL; 11 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/no-data-warning.tsx: -------------------------------------------------------------------------------- 1 | import { InfoIcon } from "lucide-react" 2 | 3 | type Props = { 4 | message?: string 5 | } 6 | 7 | export const NoDataWarning = ({ message = "No data to display." }: Props) => { 8 | return ( 9 |
10 | 11 |

{message}

12 |
13 | ) 14 | } 15 | 16 | export default NoDataWarning 17 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/types/association-types.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | 3 | export const associationTypeFormSchema = z.object({ 4 | name: z 5 | .string() 6 | .min(2, { 7 | message: "Association must be at least 2 characters.", 8 | }) 9 | .max(30, { 10 | message: "Association must not be longer than 30 characters.", 11 | }), 12 | }) 13 | 14 | export type AssociationTypeFormValues = z.infer 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/documentation/base-sql.md: -------------------------------------------------------------------------------- 1 | ``` 2 | COMMENT ON SCHEMA public IS e'@graphql({"inflect_names": true})'; 3 | 4 | DO 5 | $$ 6 | DECLARE 7 | row record; 8 | BEGIN 9 | FOR row IN SELECT tablename FROM pg_tables AS t 10 | WHERE t.schemaname = 'public' 11 | LOOP 12 | EXECUTE format('ALTER TABLE %I ENABLE ROW LEVEL SECURITY;', row.tablename); -- Enable RLS for all tables 13 | END LOOP; 14 | END; 15 | $$; 16 | ``` 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0004_melted_sprite.sql: -------------------------------------------------------------------------------- 1 | DO $$ BEGIN 2 | CREATE TYPE "roomStatusType" AS ENUM('group_intro', 'safe', 'informed', 'debate', 'results'); 3 | EXCEPTION 4 | WHEN duplicate_object THEN null; 5 | END $$; 6 | --> statement-breakpoint 7 | ALTER TABLE "participants" ADD COLUMN "ready" boolean DEFAULT false NOT NULL;--> statement-breakpoint 8 | ALTER TABLE "rooms" ADD COLUMN "room_status_type" "roomStatusType" DEFAULT 'safe' NOT NULL; 9 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/.storybook/preview.ts: -------------------------------------------------------------------------------- 1 | import type { Preview } from "@storybook/react"; 2 | import '../app/globals.css'; 3 | 4 | const preview: Preview = { 5 | parameters: { 6 | actions: { argTypesRegex: "^on[A-Z].*" }, 7 | controls: { 8 | matchers: { 9 | color: /(background|color)$/i, 10 | date: /Date$/, 11 | }, 12 | }, 13 | }, 14 | }; 15 | 16 | export default preview; 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0040_mature_puff_adder.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "help_requests" ADD COLUMN "type" "helpRequestType" DEFAULT 'facilitator' NOT NULL;--> statement-breakpoint 2 | CREATE INDEX IF NOT EXISTS "type_index" ON "help_requests" ("type");--> statement-breakpoint 3 | CREATE INDEX IF NOT EXISTS "room_id_index" ON "help_requests" ("room_id");--> statement-breakpoint 4 | CREATE INDEX IF NOT EXISTS "participant_id_index" ON "help_requests" ("participant_id"); -------------------------------------------------------------------------------- /projects/generative_social_choice/README.md: -------------------------------------------------------------------------------- 1 | # Generative Social Choice 2 | 3 | The codebase for the *Generative Social Choice* team will be located in this folder as soon as we are done with refactoring efforts. 4 | 5 | ## Brief overview 6 | 7 | - **Team members**: Sara Fish, Paul Gölz, Ariel Procaccia, Gili Rusak, Itai Shapira, Manuel Wüthrich 8 | - **Process goal**: condense a large number of free-text opinions into a handful (say 10) of statements representative of the population 9 | 10 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Chat/MessageStack.tsx: -------------------------------------------------------------------------------- 1 | import { Stack } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | // no scrollbar 5 | export const MessageStack = styled(Stack)(({ theme }) => ({ 6 | height: '100%', 7 | overflowY: 'scroll', 8 | scrollbarWidth: 'none', 9 | '&::-webkit-scrollbar': { 10 | display: 'none', 11 | }, 12 | '-msOverflowStyle': 'none', 13 | })) 14 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/globals.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | background-color: #f5f6ff; 4 | margin: 0; 5 | } 6 | 7 | .sign-out { 8 | padding: 5px 10px; 9 | border-radius: 5px; 10 | color: #88dded; 11 | border: 1px solid #1c2c4c; 12 | background-color: #1c2c4c; 13 | font-weight: 600; 14 | } 15 | 16 | .eyebrow { 17 | font-family: "Open Sans Condensed" !important; 18 | font-weight: bold; 19 | font-size: .875em; 20 | letter-spacing: .1875em; 21 | } -------------------------------------------------------------------------------- /projects/Ubuntu_AI_a_platform_for_equitable_and_inclusive_model_training/frontend/frontend/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Democtratic AI 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetLobbyParticipants.graphql: -------------------------------------------------------------------------------- 1 | query GetLobbyParticipants($userId: UUID!) { 2 | participantsCollection( 3 | filter: { 4 | user_id: { eq: $userId }, 5 | active: { eq: true }, 6 | }, 7 | orderBy: { 8 | created_at: DescNullsLast, 9 | }, 10 | ) { 11 | edges { 12 | node { 13 | ...FullParticipant 14 | } 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230731133752_constrain_chat_to_user/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `userId` to the `Chat` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Chat" ADD COLUMN "userId" INTEGER NOT NULL; 9 | 10 | -- AddForeignKey 11 | ALTER TABLE "Chat" ADD CONSTRAINT "Chat_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 12 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/not-found.tsx: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | 3 | // NOTE: cannot be translated due to missing language providers 4 | export default function NotFound() { 5 | return ( 6 |
7 |

Page Not Found

8 | Go back 9 |
10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/components/UserAvatar.js: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | 5 | import { Avatar } from "@mui/material"; 6 | 7 | const UserAvatar = ({ user, sx }) => { 8 | let imgsrc = user.imgsrc; 9 | return ( 10 | 16 | ); 17 | }; 18 | 19 | export default UserAvatar; 20 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/types/process-env.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod" 2 | 3 | const envVariables = z.object({ 4 | NEXT_PUBLIC_NODE_ENV: z.union([z.literal("development"), z.literal("production")]), 5 | NEXT_PUBLIC_ENERGIZE_ENGINE: z.string().optional(), 6 | ENERGIZE_ENGINE: z.string().optional(), 7 | NEXT_PUBLIC_ENERGIZE_ENGINE_KEY: z.string().optional(), 8 | }) 9 | 10 | declare global { 11 | namespace NodeJS { 12 | interface ProcessEnv extends z.infer {} 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/EnterRoom.graphql: -------------------------------------------------------------------------------- 1 | mutation EnterRoom($participantId: UUID!) { 2 | updateparticipantsCollection( 3 | filter: { 4 | id: { eq: $participantId }, 5 | status: { eq: waiting_for_confirmation } 6 | }, 7 | set: { 8 | status: in_room 9 | } 10 | ) { 11 | affectedCount 12 | records { 13 | id 14 | status 15 | room_id 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/topics/skeleton-topic-card.tsx: -------------------------------------------------------------------------------- 1 | import { Card, CardDescription, CardHeader, CardTitle } from "../ui/card" 2 | 3 | export const SkeletonTopicCard = () => { 4 | return ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/lib/use-debounce.ts: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from "react" 2 | 3 | export default function useDebounce(value: T, milliSeconds: number) { 4 | const [debouncedValue, setDebouncedValue] = useState(value) 5 | 6 | useEffect(() => { 7 | const handler = setTimeout(() => { 8 | setDebouncedValue(value) 9 | }, milliSeconds) 10 | 11 | return () => { 12 | clearTimeout(handler) 13 | } 14 | }, [value, milliSeconds]) 15 | 16 | return debouncedValue 17 | } 18 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/.env.example: -------------------------------------------------------------------------------- 1 | NEXT_PUBLIC_SUPABASE_URL=your-project-url 2 | NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key 3 | NEXT_PUBLIC_GRAPHQL_URL=your-graphql-key 4 | SUPABASE_PROJECT_ID=your-project-id 5 | NEXT_PUBLIC_WHEREBY_SUBDOMAIN=deliberation-at-scale.whereby.com 6 | NEXT_PUBLIC_TRANSCRIBE_API_URL=https://zunbekpaeiipejmicjme.supabase.co/functions/v1/transcribe 7 | NEXT_PUBLIC_SIGN_IN_ANONYMOUS_API_URL=https://zunbekpaeiipejmicjme.supabase.co/functions/v1/login-anonymous 8 | NEXT_PUBLIC_DEFAULT_LANGUAGE=en 9 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/room/[roomId]/ai/page.tsx: -------------------------------------------------------------------------------- 1 | import useAuth from '@/hooks/useAuth'; 2 | import RoomParticipants from '@/components/RoomParticipants'; 3 | import RoomChatSummary from '@/components/RoomChatSummary'; 4 | 5 | export default async function AI() { 6 | await useAuth(); 7 | 8 | return ( 9 |
10 | 11 | 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/room/[roomId]/chat/page.tsx: -------------------------------------------------------------------------------- 1 | import useAuth from '@/hooks/useAuth'; 2 | import RoomChatMessages from '@/components/RoomChatMessages'; 3 | import RoomParticipants from '@/components/RoomParticipants'; 4 | 5 | export default async function Chat() { 6 | await useAuth(); 7 | 8 | return ( 9 |
10 | 11 | 12 |
13 | ); 14 | } 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0023_nosy_lila_cheney.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "opinions" ADD COLUMN "participant_id" uuid;--> statement-breakpoint 2 | CREATE INDEX IF NOT EXISTS "participant_id_index" ON "opinions" ("participant_id");--> statement-breakpoint 3 | DO $$ BEGIN 4 | ALTER TABLE "opinions" ADD CONSTRAINT "opinions_participant_id_participants_id_fk" FOREIGN KEY ("participant_id") REFERENCES "participants"("id") ON DELETE no action ON UPDATE no action; 5 | EXCEPTION 6 | WHEN duplicate_object THEN null; 7 | END $$; 8 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useLocalizedPush.ts: -------------------------------------------------------------------------------- 1 | import { useRouter } from "next/navigation"; 2 | import { useCallback } from "react"; 3 | import { useLanguage } from "./useLanguage"; 4 | 5 | export default function useLocalizedPush() { 6 | const { push } = useRouter(); 7 | const language = useLanguage(); 8 | const localizedPush = useCallback((path: string) => { 9 | push(`/${language}/${path}`); 10 | }, [push, language]); 11 | 12 | return { 13 | push: localizedPush, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/SendRoomMessage.graphql: -------------------------------------------------------------------------------- 1 | mutation SendRoomMessage($roomId: UUID!, $participantId: UUID!, $content: String!, $tags: String) { 2 | insertIntomessagesCollection(objects: { 3 | room_id: $roomId, 4 | participant_id: $participantId, 5 | content: $content, 6 | tags: $tags 7 | }) { 8 | records { 9 | id 10 | room_id 11 | participant_id 12 | content 13 | tags 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/lingui.config.js: -------------------------------------------------------------------------------- 1 | const { locales, defaultLocale } = require('./locales'); 2 | 3 | /** @type {import('@lingui/conf').LinguiConfig} */ 4 | module.exports = { 5 | locales, 6 | pseudoLocale: 'pseudo', 7 | sourceLocale: defaultLocale, 8 | fallbackLocales: { 9 | default: 'en' 10 | }, 11 | catalogs: [ 12 | { 13 | path: 'locales/{locale}', 14 | include: [ 15 | './src/', 16 | ] 17 | } 18 | ] 19 | }; 20 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | /dist 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # Environment Variables 27 | .env 28 | .env.build 29 | .vercel 30 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useChatFlowMessages.ts: -------------------------------------------------------------------------------- 1 | import { FlowId } from "@/state/slices/flow"; 2 | import { useAppSelector } from "@/state/store"; 3 | 4 | export interface UseChatFlowMessagesOptions { 5 | flowId: FlowId; 6 | } 7 | 8 | export default function useChatFlowMessages(options: UseChatFlowMessagesOptions) { 9 | const { flowId } = options; 10 | const flowMessages = useAppSelector((state) => state.flow.flowMessagesLookup?.[flowId]); 11 | 12 | return { 13 | flowMessages, 14 | }; 15 | } 16 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/pages/spaces/[space_id]/index.tsx: -------------------------------------------------------------------------------- 1 | import { Constitution } from "@/components/playground/constitution" 2 | import { Experiment } from "@/components/playground/experiment" 3 | 4 | const Playground = () => { 5 | return ( 6 |
7 |
8 | 9 | 10 |
11 |
12 | ) 13 | } 14 | 15 | export default Playground 16 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/edge-functions/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | /dist 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # Environment Variables 27 | .env 28 | .env.build 29 | .vercel 30 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/src/config/crontab.ts: -------------------------------------------------------------------------------- 1 | import type { CronItem } from 'graphile-worker'; 2 | import { DISABLE_CRONTAB } from './constants'; 3 | 4 | interface ToggleableCronItem extends CronItem { 5 | active: boolean; 6 | } 7 | 8 | const crontab: ToggleableCronItem[] = [ 9 | { 10 | active: true, 11 | pattern: '* * * * *', 12 | task: 'reschedule', 13 | identifier: 'reschedule', 14 | }, 15 | ]; 16 | 17 | export default crontab.filter((cronItem) => cronItem.active && !DISABLE_CRONTAB); 18 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230904100458_unqiue_constraint_canonical_cards/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - A unique constraint covering the columns `[title,instructionsShort,instructionsDetailed,evaluationCriteria]` on the table `CanonicalValuesCard` will be added. If there are existing duplicate values, this will fail. 5 | 6 | */ 7 | -- CreateIndex 8 | CREATE UNIQUE INDEX "CanonicalValuesCard_title_instructionsShort_instructionsDet_key" ON "CanonicalValuesCard"("title", "instructionsShort", "instructionsDetailed", "evaluationCriteria"); 9 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/README.md: -------------------------------------------------------------------------------- 1 | # Making AI transparent and accountable 2 | 3 | Rappler designs an experiment that leverages the capacity of large language models to synthesize inputs from text and audio to generate policy ideas from FGDs. 4 | 5 | Can artificial intelligence (AI) systems be used to enrich democratic consultation processes around important policy matters, such as the question on how AI should be governed? 6 | 7 | [Read more ..](https://www.rappler.com/technology/features/generative-ai-use-enriching-democratic-consultations/) 8 | 9 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/error-message.tsx: -------------------------------------------------------------------------------- 1 | type Props = { 2 | message: string 3 | } 4 | 5 | export const ErrorMessage = ({ message }: Props) => { 6 | return ( 7 |
8 |

9 | Oops! 10 |

11 |

{message}

12 |
13 | ) 14 | } 15 | 16 | export default ErrorMessage 17 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/ShadowedBox.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | export const ShadowedBox = styled(Box)(({ theme }) => ({ 5 | paddingTop: theme.spacing(1.5), 6 | paddingBottom: theme.spacing(1.5), 7 | paddingLeft: theme.spacing(2), 8 | paddingRight: theme.spacing(2), 9 | borderRadius: 2, 10 | border: '1px solid #fafafa', 11 | boxShadow: '0 0 20px 1px rgba(130, 130, 130, 0.05)', 12 | })) 13 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/NoPrerender.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren, useEffect, useState } from 'react'; 2 | 3 | /** 4 | * Prevent any underlying components from being pre-rendered by Next.js. This 5 | * prevent errors such as `ReferenceError: document is not defined`. 6 | */ 7 | export default function NoPreRender({ children }: PropsWithChildren) { 8 | const [isClient, setIsClient] = useState(false); 9 | 10 | useEffect(() => { 11 | setIsClient(true); 12 | }, []); 13 | 14 | return isClient ? children : null; 15 | } -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230731135527_link_values_cards_to_user_directly_for_easier_querying/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - Added the required column `userId` to the `ValuesCard` table without a default value. This is not possible if the table is not empty. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "ValuesCard" ADD COLUMN "userId" INTEGER NOT NULL; 9 | 10 | -- AddForeignKey 11 | ALTER TABLE "ValuesCard" ADD CONSTRAINT "ValuesCard_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 12 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230809115927_adding_vote_table/migration.sql: -------------------------------------------------------------------------------- 1 | -- CreateTable 2 | CREATE TABLE "Vote" ( 3 | "id" SERIAL NOT NULL, 4 | "userId" INTEGER NOT NULL, 5 | "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, 6 | "updatedAt" TIMESTAMP(3) NOT NULL, 7 | "options" JSONB NOT NULL, 8 | 9 | CONSTRAINT "Vote_pkey" PRIMARY KEY ("id") 10 | ); 11 | 12 | -- AddForeignKey 13 | ALTER TABLE "Vote" ADD CONSTRAINT "Vote_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0035_amused_sunfire.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "participants" ALTER COLUMN "nick_name" SET DEFAULT 'Contributor';--> statement-breakpoint 2 | ALTER TABLE "users" ALTER COLUMN "nick_name" SET DEFAULT 'Contributor'; 3 | 4 | CREATE OR REPLACE FUNCTION public.ping_participant(participant_id uuid) RETURNS uuid AS $$ 5 | DECLARE updated_id uuid; 6 | BEGIN 7 | UPDATE participants SET last_seen_at = NOW() WHERE id = participant_id RETURNING id INTO updated_id; 8 | RETURN updated_id; 9 | END; 10 | $$ LANGUAGE plpgsql; 11 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/pages/api/auth.ts: -------------------------------------------------------------------------------- 1 | import { createServerComponentClient } from '@supabase/auth-helpers-nextjs'; 2 | import { NextApiRequest, NextApiResponse } from 'next'; 3 | import { cookies } from 'next/headers'; 4 | 5 | export default async function handler(req: NextApiRequest, res: NextApiResponse) { 6 | const supabase = createServerComponentClient({ cookies }); 7 | await supabase.auth.setSession({ 8 | access_token: '', 9 | refresh_token: '', 10 | }); 11 | res.status(200).json({ message: 'success' }); 12 | } 13 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/SelectShowOnHoverBox.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | export const SelectShowOnHoverBox = styled(Box)(({ theme }) => ({ 5 | // display: 'hidden', 6 | '& .select-show-on-hover-box': { 7 | opacity: 0, 8 | transition: 'opacity 0.1s ease-in-out', 9 | }, 10 | '&:hover .select-show-on-hover-box': { 11 | // display: 'block', 12 | opacity: 1, 13 | }, 14 | })) as typeof Box 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | /dist 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | 26 | # Environment Variables 27 | .env 28 | .env* 29 | .env.build 30 | .vercel 31 | 32 | # Supabase 33 | .branches 34 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/CreateOpinion.graphql: -------------------------------------------------------------------------------- 1 | mutation CreateOpinion($outcomeId: UUID, $participantId: UUID!, $type: opinionType!, $rangeValue: Int, $statement: String, $optionType: opinionOptionType) { 2 | insertIntoopinionsCollection(objects: { 3 | outcome_id: $outcomeId, 4 | participant_id: $participantId, 5 | type: $type, 6 | range_value: $rangeValue, 7 | statement: $statement, 8 | option_type: $optionType, 9 | }) { 10 | affectedCount 11 | records { 12 | ...FullOpinion 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0041_free_talisman.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "outcomeType" ADD VALUE 'seed_statement'; 2 | 3 | BEGIN; 4 | ALTER POLICY "Enable update for users based on logged in user" ON "public"."users" USING (TRUE); 5 | COMMIT; 6 | 7 | CREATE POLICY "Enable insert for service role" ON "public"."messages" 8 | AS PERMISSIVE FOR INSERT 9 | TO service_role 10 | WITH CHECK (true); 11 | 12 | CREATE POLICY "Enable read access for all service role" ON "public"."messages" 13 | AS PERMISSIVE FOR SELECT 14 | TO service_role 15 | USING (true); 16 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/scripts/setup-vps.sh: -------------------------------------------------------------------------------- 1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \ 2 | source ~/.bashrc && \ 3 | nvm install 18 && \ 4 | nvm alias default 18 && \ 5 | git clone https://github.com/openai/democratic-inputs.git && \ 6 | cd democratic-inputs/projects/deliberation_at_scale && \ 7 | npm run setup && \ 8 | cd packages/orchestrator && \ 9 | cp .env.example .env && \ 10 | npx pm2 startup && \ 11 | npm run build && \ 12 | npm run start:prod && \ 13 | npx pm2 save 14 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux' 2 | 3 | import type { RootState, AppDispatch } from '@/store' 4 | 5 | export * from './useSnapshotProposalData' 6 | export * from './useSocket' 7 | export * from './useWeb3Auth' 8 | 9 | // Typed version of `useDispatch` and `useSelector` for app 10 | export const useAppDispatch: () => AppDispatch = useDispatch 11 | export const useAppSelector: TypedUseSelectorHook = useSelector 12 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/types/chat.ts: -------------------------------------------------------------------------------- 1 | export type UserChatResponse = { 2 | id: number 3 | 4 | text: string 5 | 6 | // user's connection id, e.g. sha256(user_email + chat_location) 7 | // connection: string 8 | 9 | createdAt: number 10 | 11 | // user: User 12 | 13 | aiResponse: UserChatAiResponse 14 | } 15 | 16 | export type UserChatAiResponse = { 17 | id: number 18 | 19 | text: string 20 | 21 | connection: string 22 | 23 | createdAt: number 24 | 25 | // chat: Chat 26 | } 27 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0013_bumpy_magus.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE "job_results";--> statement-breakpoint 2 | ALTER TABLE "messages" ADD COLUMN "room_status_type" "roomStatusType";--> statement-breakpoint 3 | ALTER TABLE "moderations" ADD COLUMN "result" json DEFAULT '{}'::json NOT NULL;--> statement-breakpoint 4 | ALTER TABLE "moderations" ADD COLUMN "completed_at" timestamp;--> statement-breakpoint 5 | CREATE INDEX IF NOT EXISTS "completed_at_index" ON "moderations" ("completed_at");--> statement-breakpoint 6 | ALTER TABLE "moderations" DROP COLUMN IF EXISTS "statement"; -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/interactive/frontend/js/index.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | (function () { 4 | function Typist(dom) { 5 | this._dom = dom; 6 | } 7 | 8 | Typist.prototype.type = function (text) { 9 | 10 | } 11 | 12 | function Chatter(dom) { 13 | this._dom = dom; 14 | } 15 | 16 | Chatter.prototype.sendSys = function () { 17 | var dom = _(); 18 | return dom; 19 | } 20 | 21 | Chatter.prototype.sendMsg = function (mode) { 22 | var dom = _(); 23 | return dom; 24 | } 25 | 26 | window.addEventListener('load', function () { 27 | 28 | }); 29 | })(); 30 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | *.pem 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | 27 | # local env files 28 | .env*.local 29 | 30 | # vercel 31 | .vercel 32 | 33 | # typescript 34 | *.tsbuildinfo 35 | next-env.d.ts 36 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/LocalMedia/context.ts: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import { useLocalMedia } from '@whereby.com/browser-sdk'; 3 | import { createContext } from 'react'; 4 | 5 | export type LocalMediaRef = ReturnType; 6 | 7 | export interface LocalMediaContext extends LocalMediaRef { 8 | state: LocalMediaRef['state'] & { 9 | isVideoEnabled: boolean; 10 | isAudioEnabled: boolean; 11 | } 12 | } 13 | 14 | /** This stores the context for any local media */ 15 | export const LocalMediaContext = createContext(null); -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/src/migrator.ts: -------------------------------------------------------------------------------- 1 | import { makeWorkerUtils } from "graphile-worker"; 2 | import { DATABASE_URL } from "./config/constants"; 3 | 4 | export async function startMigrator() { 5 | const runnerUtils = await makeWorkerUtils({ 6 | connectionString: DATABASE_URL, 7 | }); 8 | 9 | runnerUtils.logger.info(`Running worker migrations`); 10 | await runnerUtils.migrate(); 11 | runnerUtils.logger.info(`Migrated all worker requirements!`); 12 | process.exit(0); 13 | } 14 | 15 | export async function stopMigrator() { 16 | // empty 17 | } 18 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230812133700_edge_renaming/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `type` on the `Edge` table. All the data in the column will be lost. 5 | - Added the required column `relationship` to the `Edge` table without a default value. This is not possible if the table is not empty. 6 | 7 | */ 8 | -- CreateEnum 9 | CREATE TYPE "Relationship" AS ENUM ('more_comprehensive', 'incommensurable', 'dont_know'); 10 | 11 | -- AlterTable 12 | ALTER TABLE "Edge" DROP COLUMN "type", 13 | ADD COLUMN "relationship" "Relationship" NOT NULL; 14 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0022_fixed_argent.sql: -------------------------------------------------------------------------------- 1 | DO $$ BEGIN 2 | CREATE TYPE "opinionOptionType" AS ENUM('agree_consensus', 'disagree_consensus'); 3 | EXCEPTION 4 | WHEN duplicate_object THEN null; 5 | END $$; 6 | --> statement-breakpoint 7 | DROP INDEX IF EXISTS "option_name_index";--> statement-breakpoint 8 | ALTER TABLE "opinions" ADD COLUMN "option_type" "opinionOptionType";--> statement-breakpoint 9 | CREATE INDEX IF NOT EXISTS "option_type_index" ON "opinions" ("option_type");--> statement-breakpoint 10 | ALTER TABLE "opinions" DROP COLUMN IF EXISTS "option_name"; 11 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/types/pod.ts: -------------------------------------------------------------------------------- 1 | import { SnapshotSupportedTypes } from '@/types' 2 | 3 | export type ValueQuestion = { 4 | id: number 5 | topic: string 6 | question: string 7 | note: string | null 8 | createdAt: string 9 | // pod: UserPod 10 | isActive: boolean 11 | // Snapshots 12 | snapshotId: string | null 13 | snapshotType: SnapshotSupportedTypes 14 | snapshotSpace: string | null 15 | snapshotStartDate: number | null 16 | snapshotEndDate: number | null 17 | snapshotChoices: string[] | null 18 | } 19 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/account/layout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react" 2 | 3 | import { SidebarLayout } from "../ui/sidebar-layout" 4 | import { Paths } from "@/lib/paths" 5 | 6 | type Props = { 7 | children: ReactNode 8 | } 9 | 10 | const sidebarNavItems = [ 11 | { 12 | title: "My Profile", 13 | href: Paths.Profile, 14 | }, 15 | { 16 | title: "Demographics", 17 | href: Paths.Demographics, 18 | }, 19 | ] 20 | 21 | export const AccountLayout = ({ children }: Props) => { 22 | return {children} 23 | } 24 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Modal/ModalInnerBox.ts: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | export const ModalInnerBox = styled(Box)(({ theme }) => ({ 5 | position: 'absolute', 6 | top: '50%', 7 | left: '50%', 8 | maxWidth: 600, 9 | width: '100%', 10 | padding: theme.spacing(3), 11 | backgroundColor: '#fff', 12 | borderRadius: '10px', 13 | boxShadow: '0 0 20px 1px rgba(130,130,130,0.13)', 14 | transform: 'translate(-50%, -50%)', 15 | zIndex: 100, 16 | })) as typeof Box 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/RoomConnection/context.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | import type { useRoomConnection as baseUseRoomConnection } from '@whereby.com/browser-sdk'; 3 | import { createContext, useContext } from 'react'; 4 | 5 | // Stores all data for the `RoomConnection` 6 | export const RoomConnectionContext = createContext | null>(null); 7 | 8 | /** 9 | * Retrieve the room connection data. Use this hook in lieu of the one that is 10 | * exposed by the Whereby SDK. 11 | */ 12 | export function useRoomConnection() { 13 | return useContext(RoomConnectionContext); 14 | } -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/README.md: -------------------------------------------------------------------------------- 1 | # DAO Helper 2 | 3 | ## Instructions 4 | Run 5 | ```bash 6 | cd next-app 7 | yarn build:extension 8 | ``` 9 | 10 | Then 11 | 1. Visit `chrome://extensions` in Chrome URL bar 12 | 2. Toggle on the `Developer Mode` (upper-right corner). 13 | 3. Click "Load unpacked" 14 | 4. Select `extension` folder from the root folder 15 | 16 | You should now see the extension next to your URL bar (or under the menu when clicking "Extension" icon). 17 | 18 | Visit any Snapshot proposal page and click on the extension icon to see some stats! 19 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/img/refusal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/commands/migrate.ts: -------------------------------------------------------------------------------- 1 | import { drizzle } from 'drizzle-orm/postgres-js'; 2 | import { migrate } from 'drizzle-orm/postgres-js/migrator'; 3 | import postgres from 'postgres'; 4 | 5 | import { DATABASE_URL } from '../config/constants'; 6 | 7 | async function main() { 8 | // create the connection 9 | const connnection = postgres(DATABASE_URL, { max: 1 }); 10 | const db = drizzle(connnection); 11 | 12 | await migrate(db, { 13 | migrationsFolder: './src/database/migrations' 14 | }); 15 | await connnection.end(); 16 | } 17 | 18 | (async () => { 19 | main(); 20 | })(); 21 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/queries/GetRooms.graphql: -------------------------------------------------------------------------------- 1 | fragment SimpleRoom on rooms { 2 | id 3 | active 4 | topics { 5 | ...SimpleRoomTopic 6 | } 7 | external_room_id 8 | status_type 9 | updated_at 10 | created_at 11 | } 12 | 13 | fragment SimpleRoomTopic on topics { 14 | id 15 | active 16 | content 17 | updated_at 18 | created_at 19 | } 20 | 21 | query GetRooms($roomId: UUID) { 22 | roomsCollection(filter: { active: { eq: true }, id: { eq: $roomId } }, orderBy: { created_at: DescNullsLast }) { 23 | edges { 24 | node { 25 | ...SimpleRoom 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --coloured-header-height: 10vh; 7 | } 8 | 9 | html, body { 10 | width: 100vw; 11 | height: 100vh; 12 | overflow: hidden; 13 | font-family: var(--font-inter); 14 | } 15 | 16 | h1,h2,h3,h4 { 17 | font-family: var(--font-red-hat-display); 18 | } 19 | 20 | h1{ 21 | font-weight: bold; 22 | } 23 | 24 | * { 25 | outline-color: #ddd; 26 | } 27 | 28 | /* #messages-scroll-container::-webkit-scrollbar, 29 | #main-scroll-container::-webkit-scrollbar { 30 | display: none; 31 | } */ 32 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/services/index.ts: -------------------------------------------------------------------------------- 1 | import { fetchBaseQuery } from '@reduxjs/toolkit/dist/query' 2 | 3 | import { RootState } from '@/store' 4 | 5 | export const baseQuery = fetchBaseQuery({ 6 | baseUrl: process.env.NEXT_PUBLIC_API_URL, 7 | prepareHeaders: (headers, { getState }) => { 8 | const state = getState() as RootState 9 | const { jwtToken } = state.app.user 10 | 11 | if (jwtToken) headers.set('Authorization', `Bearer ${jwtToken}`) 12 | 13 | return headers 14 | }, 15 | credentials: 'include', // allows server to set cookies 16 | }) 17 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/Loader.tsx: -------------------------------------------------------------------------------- 1 | import { faSpinner } from '@fortawesome/free-solid-svg-icons'; 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 3 | 4 | interface Props { 5 | title?: string; 6 | } 7 | 8 | export default function Loader(props?: Props) { 9 | const { title } = props ?? {}; 10 | 11 | return ( 12 |
13 | 14 | {title &&

{title}

} 15 |
16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/migrations/20230821195249_provisional_canonical_card/migration.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Warnings: 3 | 4 | - You are about to drop the column `provisionalCanonicalCard` on the `Chat` table. All the data in the column will be lost. 5 | 6 | */ 7 | -- AlterTable 8 | ALTER TABLE "Chat" DROP COLUMN "provisionalCanonicalCard", 9 | ADD COLUMN "canonicalValuesCardId" INTEGER, 10 | ADD COLUMN "provisionalCanonicalCardId" INTEGER; 11 | 12 | -- AddForeignKey 13 | ALTER TABLE "Chat" ADD CONSTRAINT "Chat_canonicalValuesCardId_fkey" FOREIGN KEY ("canonicalValuesCardId") REFERENCES "CanonicalValuesCard"("id") ON DELETE SET NULL ON UPDATE CASCADE; 14 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './pages/**/*.{js,ts,jsx,tsx,mdx}', 5 | './components/**/*.{js,ts,jsx,tsx,mdx}', 6 | './app/**/*.{js,ts,jsx,tsx,mdx}', 7 | ], 8 | theme: { 9 | extend: { 10 | backgroundImage: { 11 | 'gradient-radial': 'radial-gradient(var(--tw-gradient-stops))', 12 | 'gradient-conic': 13 | 'conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))', 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | } 19 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/skeleton-card.tsx: -------------------------------------------------------------------------------- 1 | import { Card, CardDescription, CardHeader, CardTitle } from "./card" 2 | import { cn } from "@/lib/utils" 3 | 4 | type Props = { 5 | className?: string 6 | } 7 | 8 | export const SkeletonCard = ({ className }: Props) => { 9 | return ( 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ) 18 | } 19 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/spaces/layout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react" 2 | 3 | import { SidebarLayout } from "../ui/sidebar-layout" 4 | 5 | type Props = { 6 | children: ReactNode 7 | } 8 | 9 | const sidebarNavItems = [ 10 | { 11 | title: "Public", 12 | href: "/spaces", 13 | }, 14 | { 15 | title: "Membership", 16 | href: "/spaces/member-only", 17 | }, 18 | ] 19 | 20 | export const SpacesLayout = ({ children }: Props) => { 21 | return ( 22 | 23 | {children} 24 | 25 | ) 26 | } 27 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Chat/AiChatBox' 2 | export * from './Chat/SocketChatBox' 3 | export * from './ColumnRow' 4 | export * from './CountrySelect' 5 | export * from './GotoLinkButton' 6 | export * from './LikertScale' 7 | export * from './LoadingScreen' 8 | export * from './Modal' 9 | export * from './Navbar' 10 | export * from './Proposal' 11 | export * from './ShadowedBox' 12 | export * from './SelectShowOnHoverBox' 13 | export * from './Topbar' 14 | export * from './VoteStats' 15 | export * from './VotingIntro' 16 | export * from './ValueQuestionBox' 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0025_new_chameleon.sql: -------------------------------------------------------------------------------- 1 | ALTER TYPE "opinionOptionType" ADD VALUE 'agree';--> statement-breakpoint 2 | ALTER TYPE "opinionOptionType" ADD VALUE 'disagree';--> statement-breakpoint 3 | ALTER TYPE "opinionOptionType" ADD VALUE 'wrong';--> statement-breakpoint 4 | ALTER TYPE "opinionOptionType" ADD VALUE 'positive';--> statement-breakpoint 5 | ALTER TYPE "opinionOptionType" ADD VALUE 'negative';--> statement-breakpoint 6 | ALTER TYPE "opinionOptionType" ADD VALUE 'neutral';--> statement-breakpoint 7 | ALTER TYPE "outcomeType" ADD VALUE 'overall_impression';--> statement-breakpoint 8 | ALTER TYPE "outcomeType" ADD VALUE 'topic_interest'; -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/functions/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | es6: true, 4 | node: true, 5 | }, 6 | parserOptions: { 7 | "ecmaVersion": 2018, 8 | }, 9 | extends: [ 10 | "eslint:recommended", 11 | "google", 12 | ], 13 | rules: { 14 | "no-restricted-globals": ["error", "name", "length"], 15 | "prefer-arrow-callback": "error", 16 | "quotes": ["error", "double", {"allowTemplateLiterals": true}], 17 | }, 18 | overrides: [ 19 | { 20 | files: ["**/*.spec.*"], 21 | env: { 22 | mocha: true, 23 | }, 24 | rules: {}, 25 | }, 26 | ], 27 | globals: {}, 28 | }; 29 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0009_living_steel_serpent.sql: -------------------------------------------------------------------------------- 1 | DO $$ BEGIN 2 | CREATE TYPE "participantStatusType" AS ENUM('queued', 'waiting_for_confirmation', 'transfering_to_room', 'in_room', 'end_of_session'); 3 | EXCEPTION 4 | WHEN duplicate_object THEN null; 5 | END $$; 6 | --> statement-breakpoint 7 | DROP INDEX IF EXISTS "ready_index";--> statement-breakpoint 8 | ALTER TABLE "participants" ADD COLUMN "status" "participantStatusType" DEFAULT 'queued' NOT NULL;--> statement-breakpoint 9 | ALTER TABLE "participants" ADD COLUMN "last_seen_at" timestamp DEFAULT now() NOT NULL;--> statement-breakpoint 10 | ALTER TABLE "participants" DROP COLUMN IF EXISTS "ready"; -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useChatFlowState.ts: -------------------------------------------------------------------------------- 1 | import { FlowId, FlowStateEntries } from "@/state/slices/flow"; 2 | import { useAppSelector } from "@/state/store"; 3 | 4 | export interface UseChatFlowStateOptions { 5 | flowId: FlowId; 6 | stateKey: string; 7 | } 8 | 9 | const defaultFlowState: FlowStateEntries = {}; 10 | 11 | export default function useChatFlowState(options: UseChatFlowStateOptions) { 12 | const { flowId, stateKey } = options ?? {}; 13 | const flowState = useAppSelector((state) => state.flow.flowStateLookup[flowId] ?? defaultFlowState); 14 | const flowStateValue = flowState[stateKey]; 15 | 16 | return flowStateValue as T; 17 | } 18 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/commands/generateMagicLink.ts: -------------------------------------------------------------------------------- 1 | import { createClient } from "@supabase/supabase-js"; 2 | import { SUPABASE_URL, SUPABASE_SERVICE_API_KEY } from "../config/constants"; 3 | 4 | const supabaseAdminClient = createClient( 5 | SUPABASE_URL, 6 | SUPABASE_SERVICE_API_KEY 7 | ); 8 | 9 | async function main() { 10 | const { data } = await supabaseAdminClient.auth.admin.generateLink({ 11 | type: 'magiclink', 12 | email: 'hello@bmd.studio', 13 | options: { 14 | redirectTo: 'http://localhost:3200', 15 | }, 16 | }); 17 | 18 | console.log(data); 19 | } 20 | 21 | (async () => { 22 | main(); 23 | })(); 24 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Chat/PromptSuggestion.tsx: -------------------------------------------------------------------------------- 1 | import { Stack } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | export const PromptSuggestion = styled(Stack)(({ theme }) => ({ 5 | flexDirection: 'row', 6 | alignItems: 'center', 7 | justifyContent: 'space-between', 8 | gap: '6px', 9 | height: '100%', 10 | width: '100%', 11 | padding: theme.spacing(2), 12 | borderRadius: 4, 13 | backgroundColor: '#f7f9fc', 14 | cursor: 'pointer', 15 | transition: 'background-color 0.2s ease-in-out', 16 | '&:hover': { 17 | backgroundColor: '#c9e6fc', 18 | }, 19 | })) 20 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/ColumnRow.tsx: -------------------------------------------------------------------------------- 1 | import { Stack, SxProps } from '@mui/material' 2 | 3 | export type ColumnRowProps = { 4 | spacing?: number 5 | py?: number 6 | children?: React.ReactNode | undefined 7 | sx?: SxProps 8 | } 9 | 10 | export function ColumnRow(props: ColumnRowProps) { 11 | return ( 12 | 21 | {props.children} 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/lingui.config.js: -------------------------------------------------------------------------------- 1 | const { locales, defaultLocale } = require('./locales'); 2 | 3 | /** @type {import('@lingui/conf').LinguiConfig} */ 4 | module.exports = { 5 | locales, 6 | pseudoLocale: 'pseudo', 7 | sourceLocale: defaultLocale, 8 | fallbackLocales: { 9 | default: 'en' 10 | }, 11 | catalogs: [ 12 | { 13 | path: 'locales/{locale}', 14 | include: [ 15 | './app/', 16 | './components/', 17 | './hooks/', 18 | './pages/', 19 | './state/', 20 | './utilities/', 21 | ] 22 | } 23 | ] 24 | }; 25 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/ValueQuestionBox.tsx: -------------------------------------------------------------------------------- 1 | import { styled } from '@mui/material/styles' 2 | import NextLink from 'next/link' 3 | 4 | export const ValueQuestionBox = styled(NextLink)(({ theme }) => ({ 5 | display: 'inline-block', 6 | width: 'full', 7 | padding: '12px 24px', 8 | border: '1px solid #e3e4e5', 9 | borderRadius: 6, 10 | boxShadow: '0 0 20px 1px rgba(130,130,130,0.05)', 11 | textDecoration: 'none', 12 | color: 'inherit', 13 | transition: 'border-color 0.2s ease-in-out', 14 | '&:hover': { 15 | borderColor: theme.palette.primary.main, 16 | cursor: 'pointer', 17 | }, 18 | })) 19 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/small-spinner.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | type Props = { 4 | className?: string 5 | } 6 | 7 | export const SmallSpinner = ({ className }: Props) => { 8 | return ( 9 | 15 | 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "removeComments": true, 6 | "emitDecoratorMetadata": true, 7 | "experimentalDecorators": true, 8 | "esModuleInterop": true, 9 | "allowSyntheticDefaultImports": true, 10 | "target": "ES2021", 11 | "sourceMap": true, 12 | "outDir": "./dist", 13 | "baseUrl": "./", 14 | "incremental": true, 15 | "skipLibCheck": true, 16 | "strictNullChecks": false, 17 | "noImplicitAny": false, 18 | "strictBindCallApply": false, 19 | "forceConsistentCasingInFileNames": false, 20 | "noFallthroughCasesInSwitch": false 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0030_colorful_patriot.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "opinions" ADD COLUMN "cross_pollination_id" uuid;--> statement-breakpoint 2 | CREATE INDEX IF NOT EXISTS "cross_pollination_id_index" ON "opinions" ("cross_pollination_id");--> statement-breakpoint 3 | DO $$ BEGIN 4 | ALTER TABLE "opinions" ADD CONSTRAINT "opinions_cross_pollination_id_cross_pollinations_id_fk" FOREIGN KEY ("cross_pollination_id") REFERENCES "cross_pollinations"("id") ON DELETE no action ON UPDATE no action; 5 | EXCEPTION 6 | WHEN duplicate_object THEN null; 7 | END $$; 8 | --> statement-breakpoint 9 | ALTER TABLE "opinions" ADD CONSTRAINT "unique_opinion" UNIQUE("outcome_id","cross_pollination_id","participant_id"); -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/app/[lang]/room/[roomId]/compact/page.tsx: -------------------------------------------------------------------------------- 1 | import useAuth from '@/hooks/useAuth'; 2 | import RoomChatMessages from '@/components/RoomChatMessages'; 3 | import RoomParticipants from '@/components/RoomParticipants'; 4 | import RoomTopic from '@/components/RoomTopic'; 5 | import LatestRoomOutcome from '@/components/LatestRoomOutcome'; 6 | 7 | export default async function Compact() { 8 | await useAuth(); 9 | 10 | return ( 11 |
12 | 13 | 14 | 15 | 16 |
17 | ); 18 | } 19 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/VoteStats/BorderedLinearProgress.tsx: -------------------------------------------------------------------------------- 1 | import { styled } from '@mui/material/styles' 2 | import LinearProgress, { 3 | linearProgressClasses, 4 | } from '@mui/material/LinearProgress' 5 | 6 | export const BorderLinearProgress = styled(LinearProgress)(({ theme }) => ({ 7 | height: 8, 8 | borderRadius: 5, 9 | [`&.${linearProgressClasses.colorPrimary}`]: { 10 | backgroundColor: 11 | theme.palette.grey[theme.palette.mode === 'light' ? 200 : 800], 12 | }, 13 | [`& .${linearProgressClasses.bar}`]: { 14 | borderRadius: 5, 15 | backgroundColor: theme.palette.mode === 'light' ? '#1a90ff' : '#308fe8', 16 | }, 17 | })) 18 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Link.tsx: -------------------------------------------------------------------------------- 1 | import React, { forwardRef, Ref } from 'react' 2 | import Link, { LinkProps } from 'next/link' 3 | import { Link as MuiLink, LinkProps as MuiLinkProps } from '@mui/material' 4 | 5 | type LinkRef = HTMLAnchorElement 6 | type NextLinkProps = Omit & 7 | Pick 8 | 9 | const NextLink = ( 10 | { href, as, prefetch, ...props }: LinkProps, 11 | ref: Ref, 12 | ) => ( 13 | 14 | 15 | 16 | ) 17 | 18 | export default forwardRef(NextLink) 19 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/hosting/lib/utils.js: -------------------------------------------------------------------------------- 1 | import { serverTimestamp, setDoc, doc, collection } from "firebase/firestore"; 2 | import { db } from "../lib/firebase"; 3 | 4 | export const getRandomInt = (max) => 5 | Math.floor(Math.random() * Math.floor(max)); 6 | 7 | export const toSentenceCase = (str) => 8 | str.charAt(0).toUpperCase() + str.slice(1).toLowerCase(); 9 | 10 | export const updateUserStatus = async (uid, status) => { 11 | await setDoc( 12 | doc(collection(db, "users"), uid), 13 | { 14 | lastactive: serverTimestamp(), 15 | status, 16 | }, 17 | { merge: true } 18 | ); 19 | }; 20 | 21 | export const isValidEmail = (email) => { 22 | return /\S+@\S+\.\S+/.test(email); 23 | }; 24 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/orchestrator/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "es2020", 5 | "allowJs": true, 6 | "removeComments": true, 7 | "resolveJsonModule": true, 8 | "typeRoots": ["./node_modules/@types"], 9 | "sourceMap": true, 10 | "outDir": "dist", 11 | "strict": true, 12 | "lib": ["es2020"], 13 | "forceConsistentCasingInFileNames": true, 14 | "esModuleInterop": true, 15 | "experimentalDecorators": true, 16 | "emitDecoratorMetadata": true, 17 | "moduleResolution": "Node", 18 | "skipLibCheck": true 19 | }, 20 | "include": ["src/**/*"], 21 | "exclude": ["node_modules"] 22 | } 23 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/img/bot-profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/img/content-violation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/hooks/useQuickReplies.tsx: -------------------------------------------------------------------------------- 1 | import { QuickReply } from "../types/flows"; 2 | import { faRotate } from '@fortawesome/free-solid-svg-icons'; 3 | import { useMemo } from "react"; 4 | import { useLingui } from "@lingui/react"; 5 | import { msg } from "@lingui/macro"; 6 | 7 | export default function useQuickReplies() { 8 | const { _ } = useLingui(); 9 | const resetQuickReply = useMemo(() => { 10 | return { 11 | id: 'start-over', 12 | content: _(msg`Start over`), 13 | icon: faRotate, 14 | onClick(helpers) { 15 | helpers.reset?.(); 16 | }, 17 | } satisfies QuickReply; 18 | }, [_]); 19 | 20 | return { 21 | resetQuickReply, 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /projects/democratic_fine_tuning/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "remix.env.d.ts", 4 | "**/*.ts", 5 | "**/*.tsx" 6 | ], 7 | "compilerOptions": { 8 | "lib": [ 9 | "DOM", 10 | "DOM.Iterable", 11 | "ES2019" 12 | ], 13 | "isolatedModules": true, 14 | "esModuleInterop": true, 15 | "jsx": "react-jsx", 16 | "moduleResolution": "node", 17 | "resolveJsonModule": true, 18 | "target": "ES2019", 19 | "strict": true, 20 | "allowJs": true, 21 | "forceConsistentCasingInFileNames": true, 22 | "baseUrl": ".", 23 | "paths": { 24 | "~/*": [ 25 | "./app/*" 26 | ] 27 | }, 28 | "skipLibCheck": true, 29 | // Remix takes care of building everything in `remix build`. 30 | "noEmit": true 31 | } 32 | } -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/services/survey.ts: -------------------------------------------------------------------------------- 1 | import { createApi } from '@reduxjs/toolkit/query/react' 2 | 3 | import { baseQuery } from '@/services' 4 | import type { ApiResponse } from '@/services/user' 5 | 6 | export const surveyApi = createApi({ 7 | reducerPath: 'surveyApi', 8 | baseQuery, 9 | endpoints: (builder) => ({ 10 | postSurveyAi: builder.mutation< 11 | ApiResponse, // response body 12 | { survey: any; appPubkey: string } // request body 13 | >({ 14 | query: (body) => ({ 15 | url: 'survey/ai', 16 | method: 'POST', 17 | body, 18 | }), 19 | }), 20 | }), 21 | }) 22 | 23 | export const { usePostSurveyAiMutation } = surveyApi 24 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "paths": { 18 | "@/*": ["./src/*"] 19 | } 20 | }, 21 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 22 | "exclude": ["node_modules", ".next"], 23 | "ts-node": { 24 | "compilerOptions": { 25 | "module": "CommonJS" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 27 | "exclude": ["node_modules"] 28 | } 29 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/src/components/Chat/MessageBoxScrollDownButton.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from '@mui/material' 2 | import { styled } from '@mui/material/styles' 3 | 4 | export const MessageBoxScrollDownButton = styled(Box)(({ theme }) => ({ 5 | position: 'absolute', 6 | width: '50px', 7 | padding: theme.spacing(1), 8 | left: '50%', 9 | right: 0, 10 | bottom: '80px', 11 | opacity: 0.8, 12 | borderRadius: 6, 13 | backgroundColor: '#fff', 14 | boxShadow: '0 0 10px rgba(0,0,0,0.10)', 15 | textAlign: 'center', 16 | zIndex: 10, 17 | cursor: 'pointer', 18 | transform: 'translate(-50%, 0)', 19 | transition: 'background-color 0.2s ease-in-out', 20 | '&:hover': { 21 | backgroundColor: '#eee', 22 | }, 23 | })) 24 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore macos cruft 2 | .DS_Store 3 | .AppleDouble 4 | .LSOverride 5 | 6 | # Icon must end with two \r 7 | Icon 8 | 9 | # Thumbnails 10 | ._* 11 | 12 | ## Ignore python notebook cruft 13 | __pycache__/ 14 | *.py[cod] 15 | *$py.class 16 | 17 | # Jupyter Notebook 18 | .ipynb_checkpoints 19 | 20 | # IPython 21 | profile_default/ 22 | ipython_config.py 23 | 24 | # Environments 25 | .env 26 | .venv 27 | env/ 28 | venv/ 29 | 30 | ## Ignore vscode stuff 31 | .vscode/* 32 | !.vscode/settings.json 33 | !.vscode/tasks.json 34 | !.vscode/launch.json 35 | !.vscode/extensions.json 36 | !.vscode/*.code-snippets 37 | 38 | # Local History for Visual Studio Code 39 | .history/ 40 | 41 | # Built Visual Studio Code Extensions 42 | *.vsix 43 | 44 | ## Ignore .env files for security 45 | .env 46 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0019_workable_chat.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "cross_pollinations" DROP CONSTRAINT "cross_pollinations_room_id_messages_id_fk"; 2 | --> statement-breakpoint 3 | ALTER TABLE "outcomes" ADD COLUMN "room_id" uuid;--> statement-breakpoint 4 | DO $$ BEGIN 5 | ALTER TABLE "cross_pollinations" ADD CONSTRAINT "cross_pollinations_room_id_rooms_id_fk" FOREIGN KEY ("room_id") REFERENCES "rooms"("id") ON DELETE no action ON UPDATE no action; 6 | EXCEPTION 7 | WHEN duplicate_object THEN null; 8 | END $$; 9 | --> statement-breakpoint 10 | DO $$ BEGIN 11 | ALTER TABLE "outcomes" ADD CONSTRAINT "outcomes_room_id_rooms_id_fk" FOREIGN KEY ("room_id") REFERENCES "rooms"("id") ON DELETE no action ON UPDATE no action; 12 | EXCEPTION 13 | WHEN duplicate_object THEN null; 14 | END $$; 15 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/state/slices/profile.ts: -------------------------------------------------------------------------------- 1 | import { PayloadAction, createSlice } from "@reduxjs/toolkit"; 2 | import { Session, User } from "@supabase/supabase-js"; 3 | 4 | const initialState = { 5 | authUser: null as User | null, 6 | authSession: null as Session | null, 7 | }; 8 | 9 | const slice = createSlice({ 10 | name: 'profile', 11 | initialState, 12 | reducers: { 13 | setAuthUser: (state, action: PayloadAction) => { 14 | state.authUser = action.payload; 15 | }, 16 | setAuthSession: (state, action: PayloadAction) => { 17 | state.authSession = action.payload; 18 | }, 19 | }, 20 | }); 21 | 22 | export default slice; 23 | 24 | export const { setAuthUser, setAuthSession } = slice.actions; 25 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/frontend/components/Pill.tsx: -------------------------------------------------------------------------------- 1 | import { IconProp } from '@fortawesome/fontawesome-svg-core'; 2 | import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; 3 | import classNames from 'classnames'; 4 | import { PropsWithChildren } from 'react'; 5 | 6 | export interface PillProps extends PropsWithChildren { 7 | icon?: IconProp; 8 | className?: string; 9 | iconClassName?: string; 10 | } 11 | 12 | export default function Pill({ icon, children, className, iconClassName }: PillProps) { 13 | return ( 14 |
15 | {icon && } 16 | {children} 17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/section-header.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | type Props = { 4 | title: string 5 | description?: string 6 | children?: React.ReactNode 7 | variant?: "normal" | "large" 8 | } 9 | 10 | export const SectionHeader = ({ title, description, children, variant }: Props) => { 11 | return ( 12 |
13 |
14 |

17 | {title} 18 |

19 | {description &&

{description}

} 20 |
21 | {children} 22 |
23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/separator.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | 5 | import { cn } from "@/lib/utils" 6 | import * as SeparatorPrimitive from "@radix-ui/react-separator" 7 | 8 | const Separator = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => ( 12 | 19 | )) 20 | Separator.displayName = SeparatorPrimitive.Root.displayName 21 | 22 | export { Separator } 23 | -------------------------------------------------------------------------------- /projects/case_law_for_ai_policy/docs/assets/img/mobile-game.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /projects/inclusive_ai_a_chatgpt_plugin_and_dao_to_engage_marginalized_groups_in_ai/Inclusive.AI app/website/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "noEmit": true, 10 | "esModuleInterop": true, 11 | "module": "esnext", 12 | "moduleResolution": "bundler", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "jsx": "preserve", 16 | "incremental": true, 17 | "plugins": [ 18 | { 19 | "name": "next" 20 | } 21 | ], 22 | "paths": { 23 | "@/*": ["./src/*"] 24 | } 25 | }, 26 | "include": ["next-env.d.ts", "src/**/*.ts", "src/**/*.tsx"], 27 | "exclude": ["node_modules"] 28 | } 29 | -------------------------------------------------------------------------------- /projects/making_ai_transparent_and_accountable/rappler_aidialogue/functions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "functions", 3 | "description": "Cloud Functions for Firebase", 4 | "scripts": { 5 | "lint": "eslint .", 6 | "serve": "firebase emulators:start --only functions", 7 | "shell": "firebase functions:shell", 8 | "start": "npm run shell", 9 | "deploy": "firebase deploy --only functions", 10 | "logs": "firebase functions:log" 11 | }, 12 | "engines": { 13 | "node": "20" 14 | }, 15 | "main": "index.js", 16 | "dependencies": { 17 | "firebase-admin": "^11.8.0", 18 | "firebase-functions": "^4.3.1", 19 | "langchain": "latest" 20 | }, 21 | "devDependencies": { 22 | "eslint": "^8.15.0", 23 | "eslint-config-google": "^0.14.0", 24 | "firebase-functions-test": "^3.1.0" 25 | }, 26 | "private": true 27 | } 28 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/packages/data-core/src/database/migrations/0037_chemical_overlord.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE "help_requests" ADD COLUMN "participant_id" uuid;--> statement-breakpoint 2 | DO $$ BEGIN 3 | ALTER TABLE "help_requests" ADD CONSTRAINT "help_requests_participant_id_participants_id_fk" FOREIGN KEY ("participant_id") REFERENCES "participants"("id") ON DELETE no action ON UPDATE no action; 4 | EXCEPTION 5 | WHEN duplicate_object THEN null; 6 | END $$; 7 | 8 | CREATE POLICY "Enable insert for authenticated users only" ON "public"."help_requests" 9 | AS PERMISSIVE FOR INSERT 10 | TO authenticated 11 | WITH CHECK (participant_id IN (SELECT id FROM participants)); 12 | 13 | CREATE POLICY "Enable read access for authenticated" ON "public"."help_requests" 14 | AS PERMISSIVE FOR SELECT 15 | TO authenticated 16 | USING (participant_id IN (SELECT id FROM participants)); 17 | -------------------------------------------------------------------------------- /projects/deliberation_at_scale/deliberation-at-scale.code-workspace: -------------------------------------------------------------------------------- 1 | { 2 | "folders": [ 3 | { 4 | "name": "project-root", 5 | "path": "./" 6 | }, 7 | { 8 | "name": "data-core", 9 | "path": "./packages/data-core" 10 | }, 11 | { 12 | "name": "edge-functions", 13 | "path": "./packages/edge-functions" 14 | }, 15 | { 16 | "name": "frontend", 17 | "path": "./packages/frontend" 18 | }, 19 | { 20 | "name": "orchestrator", 21 | "path": "./packages/orchestrator" 22 | }, 23 | ], 24 | "settings": { 25 | "files.exclude": { 26 | "node_modules/": true, 27 | "app/": true, 28 | "edge-functions/functions/": true 29 | }, 30 | "deno.importMap": "./edge-functions/functions/import_map.json" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import { cva } from "class-variance-authority" 4 | import type { VariantProps } from "class-variance-authority" 5 | import * as React from "react" 6 | 7 | import { cn } from "@/lib/utils" 8 | import * as LabelPrimitive from "@radix-ui/react-label" 9 | 10 | const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70") 11 | 12 | const Label = React.forwardRef< 13 | React.ElementRef, 14 | React.ComponentPropsWithoutRef & VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 17 | )) 18 | Label.displayName = LabelPrimitive.Root.displayName 19 | 20 | export { Label } 21 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/contributions/layout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react" 2 | 3 | import { SidebarLayout } from "../ui/sidebar-layout" 4 | import { Paths } from "@/lib/paths" 5 | import { useRouter } from "next/router" 6 | 7 | type Props = { 8 | children: ReactNode 9 | } 10 | 11 | export const ContributionsLayout = ({ children }: Props) => { 12 | const router = useRouter() 13 | const { space_id } = router.query 14 | 15 | const sidebarNavItems = [ 16 | { 17 | title: "My Guidelines", 18 | href: Paths.MyGuidelines, 19 | }, 20 | { 21 | title: "My Ratings", 22 | href: Paths.MyRatings, 23 | }, 24 | ].map((item) => ({ 25 | ...item, 26 | href: item.href.replace(":id", space_id as string), 27 | })) 28 | 29 | return {children} 30 | } 31 | -------------------------------------------------------------------------------- /projects/Aligned-Platform-EnergizeAI/app/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps extends React.TextareaHTMLAttributes {} 6 | 7 | const Textarea = React.forwardRef(({ className, ...props }, ref) => { 8 | return ( 9 |