├── hyperbolic-rs ├── tests │ ├── __init__.py │ ├── test_item_graph.py │ └── test_hyperbolic_math.py ├── rudders │ ├── math │ │ ├── __init__.py │ │ └── euclid.py │ ├── graph │ │ ├── __init__.py │ │ ├── analysis │ │ │ ├── plot_seccurvs.py │ │ │ ├── plot_nodes_per_layer.py │ │ │ ├── degrees.py │ │ │ ├── nodes_per_layer.py │ │ │ ├── plot_hyperbolicity.py │ │ │ ├── utils.py │ │ │ ├── plot_degrees.py │ │ │ ├── ricci_curv.py │ │ │ ├── hyperbolicities.py │ │ │ └── seccurvs.py │ │ ├── utils.py │ │ ├── plot_seccurv.py │ │ └── seccurv.py │ ├── __init__.py │ ├── datasets │ │ ├── __init__.py │ │ ├── process_results.py │ │ ├── movielens.py │ │ ├── synopsis.py │ │ └── amazon_relations.py │ ├── models │ │ ├── __init__.py │ │ ├── complex.py │ │ └── hyperbolic.py │ ├── relations.py │ ├── config.py │ └── utils.py ├── exec.sh ├── .gitignore ├── README.md ├── docs │ └── hyper-params.md ├── popular_choice.py └── graph_stats.py ├── llm-recs ├── llm-recs-webclient │ ├── src │ │ ├── assets │ │ │ ├── .gitkeep │ │ │ ├── favicon-32x32.png │ │ │ └── pair-logo.svg │ │ ├── app │ │ │ ├── page-not-found │ │ │ │ ├── page-not-found.component.scss │ │ │ │ ├── page-not-found.component.html │ │ │ │ ├── page-not-found.component.ts │ │ │ │ └── page-not-found.component.spec.ts │ │ │ ├── prompts-config │ │ │ │ ├── prompts-config.component.scss │ │ │ │ ├── prompts-config.component.html │ │ │ │ ├── prompts-config.component.ts │ │ │ │ └── prompts-config.component.spec.ts │ │ │ ├── llm-api-config │ │ │ │ ├── llm-api-config.component.scss │ │ │ │ ├── llm-api-config.component.html │ │ │ │ ├── llm-api-config.component.ts │ │ │ │ └── llm-api-config.component.spec.ts │ │ │ ├── app-settings │ │ │ │ ├── app-settings.component.scss │ │ │ │ ├── app-settings.component.spec.ts │ │ │ │ └── app-settings.component.html │ │ │ ├── services │ │ │ │ ├── lm-api.service.spec.ts │ │ │ │ ├── vertex-api.service.spec.ts │ │ │ │ ├── saved-data.service.spec.ts │ │ │ │ ├── google-auth.service.spec.ts │ │ │ │ ├── google-sheets.service.spec.ts │ │ │ │ ├── item-interpreter.service.spec.ts │ │ │ │ ├── google-drive-appdata.service.spec.ts │ │ │ │ ├── lm-api.service.ts │ │ │ │ ├── vertex-api.service.ts │ │ │ │ └── item-interpreter.service.ts │ │ │ ├── rudders-home │ │ │ │ ├── rudders-home.component.scss │ │ │ │ ├── rudders-home.component.html │ │ │ │ ├── rudders-home.component.spec.ts │ │ │ │ └── rudders-home.component.ts │ │ │ ├── data-viewer │ │ │ │ ├── data-viewer.component.html │ │ │ │ ├── data-viewer.component.spec.ts │ │ │ │ ├── data-viewer.component.scss │ │ │ │ └── data-viewer.component.ts │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.ts │ │ │ ├── data-item │ │ │ │ ├── data-item.component.spec.ts │ │ │ │ ├── data-item.component.html │ │ │ │ └── data-item.component.ts │ │ │ ├── app.component.html │ │ │ ├── app.component.scss │ │ │ ├── app.component.spec.ts │ │ │ └── app.module.ts │ │ ├── favicon.ico │ │ ├── styles.scss │ │ ├── main.ts │ │ ├── lib │ │ │ ├── text-embeddings │ │ │ │ ├── embedder.ts │ │ │ │ ├── scripts │ │ │ │ │ ├── tsconfig.json │ │ │ │ │ └── run_embedder_raw.ts │ │ │ │ ├── embedder_api.ts │ │ │ │ └── embedder_vertexapi.ts │ │ │ ├── simple-errors │ │ │ │ └── simple-errors.ts │ │ │ └── recommender-prompts │ │ │ │ └── item-interpreter.ts │ │ ├── environments │ │ │ ├── environment.ts │ │ │ ├── environment.development.ts │ │ │ └── gcloud_env.template.ts │ │ └── index.html │ ├── .vscode │ │ ├── settings.json │ │ ├── extensions.json │ │ ├── launch.json │ │ └── tasks.json │ ├── proxy.conf.json │ ├── .editorconfig │ ├── tsconfig.app.json │ ├── tsconfig.spec.json │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ ├── README.md │ └── angular.json └── appengine-server │ ├── app.yaml │ ├── tsconfig.json │ ├── .editorconfig │ ├── tsconfig.spec.json │ ├── tests │ └── server.spec.ts │ ├── views │ └── form.html │ ├── src │ ├── text-embeddings │ │ ├── embedder.ts │ │ ├── scripts │ │ │ ├── tsconfig.json │ │ │ ├── run_embedder_gaxois.ts │ │ │ └── run_embedder_raw.ts │ │ ├── embedder_gaxois_vertexapi.ts │ │ └── embedder_vertexapi.ts │ └── simple-errors │ │ └── simple-errors.ts │ ├── .gcloudignore │ ├── .gitignore │ ├── package.json │ └── server.ts ├── .DS_Store └── README.md /hyperbolic-rs/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hyperbolic-rs/rudders/math/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /hyperbolic-rs/rudders/graph/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /llm-recs/appengine-server/app.yaml: -------------------------------------------------------------------------------- 1 | runtime: nodejs18 2 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/page-not-found/page-not-found.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/prompts-config/prompts-config.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAIR-code/recommendation-rudders/HEAD/.DS_Store -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.tabSize": 2 3 | } 4 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/page-not-found/page-not-found.component.html: -------------------------------------------------------------------------------- 1 |
prompts-config works!
2 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAIR-code/recommendation-rudders/HEAD/llm-recs/llm-recs-webclient/src/favicon.ico -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/assets/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PAIR-code/recommendation-rudders/HEAD/llm-recs/llm-recs-webclient/src/assets/favicon-32x32.png -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 3 | "recommendations": ["angular.ng-template"] 4 | } 5 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/proxy.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "/api/*": { 3 | "target": "http://localhost:8080", 4 | "secure": false, 5 | "logLevel": "debug", 6 | "changeOrigin": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | html, body { height: 100%; } 4 | body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } 5 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/llm-api-config/llm-api-config.component.scss: -------------------------------------------------------------------------------- 1 | .main { 2 | } 3 | 4 | .cloud-info-form { 5 | min-width: 150px; 6 | max-width: 500px; 7 | width: 100%; 8 | } 9 | 10 | .full-width { 11 | width: 100%; 12 | } 13 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/main.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 4 | 5 | import { AppModule } from './app/app.module'; 6 | 7 | 8 | platformBrowserDynamic().bootstrapModule(AppModule) 9 | .catch(err => console.error(err)); 10 | -------------------------------------------------------------------------------- /llm-recs/appengine-server/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "CommonJS", 4 | "target": "ESNext", 5 | "strict": true, 6 | "noImplicitAny": false, 7 | "esModuleInterop": true, 8 | "moduleResolution": "node", 9 | "outDir": "build" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/page-not-found/page-not-found.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-page-not-found', 5 | templateUrl: './page-not-found.component.html', 6 | styleUrls: ['./page-not-found.component.scss'] 7 | }) 8 | export class PageNotFoundComponent { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /llm-recs/appengine-server/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/app/app-settings/app-settings.component.scss: -------------------------------------------------------------------------------- 1 | .main { 2 | } 3 | 4 | .full-width { 5 | width: 100%; 6 | } 7 | 8 | .error { 9 | color: #990000; 10 | border-radius: 5px; 11 | border: solid 1px #990000; 12 | background-color: #FBB; 13 | padding: 5px; 14 | } 15 | 16 | .row { 17 | display: flex; 18 | } 19 | 20 | .spacer { 21 | flex: 1; 22 | } 23 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": ["gapi", "gapi.client.sheets-v4", "gapi.client.discovery-v1", "google.accounts"], 7 | }, 8 | "files": [ 9 | "src/main.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine", "gapi", "gapi.client.sheets-v4", "gapi.client.discovery-v1", "google.accounts" 8 | ] 9 | }, 10 | "include": [ 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /llm-recs/llm-recs-webclient/src/lib/text-embeddings/embedder.ts: -------------------------------------------------------------------------------- 1 | import { ErrorResponse } from "../simple-errors/simple-errors"; 2 | 3 | export interface Embedding { 4 | embedding: number[]; 5 | } 6 | 7 | export interface EmbedError { 8 | error: string; 9 | } 10 | 11 | export abstract class Embedder4 | You can this on the command line to get your parameters: 5 |
6 |7 | echo "Project: $(gcloud config get-value project)" 8 | echo "AccessToken: $(gcloud auth print-access-token)" 9 |10 |
11 | Note: the access token generally works for 1 hour. After that, you'll need to 12 | renew it. 13 |
14 |15 | And then copy/paste them here: 16 |
17 | 28 |29 | These values are saved in your local browser storage, you can clear them 30 | by simply editing the above fields (local browser storage is updated as you 31 | type). 32 |
33 |