This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { readFileSync } from 'fs'; | |
| const LIGHTRAG_URL = process.env.LIGHTRAG_URL || 'http://localhost:9621'; | |
| async function ingestTvShows() { | |
| const data = JSON.parse(readFileSync('tmdb_tv_shows.json', 'utf-8')); | |
| const tvShows = data.tv_shows; | |
| console.log(`Ingesting ${tvShows.length} TV shows into LightRAG`); | |
| console.log(`LightRAG URL: ${LIGHTRAG_URL}\n`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { writeFileSync } from 'fs'; | |
| const API_KEY = process.env.TMDB_API_KEY; | |
| if (!API_KEY) { | |
| console.error('Error: TMDB_API_KEY environment variable is required'); | |
| process.exit(1); | |
| } | |
| const BASE_URL = 'https://api.themoviedb.org/3/discover/tv'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2021-08-27T19:15:34.964Z","extensionVersion":"v3.4.3"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import axios from 'axios'; | |
| import { find, keys } from 'ramda'; | |
| import responseCodes from '../config/responseCodes'; | |
| import socketService from '../common/services/socket'; | |
| import { ERROR, INFO, SUCCESS } from '../common/components/Alert/Alert'; | |
| function handleInfoResponse(infoCode, showAlertFn) { | |
| const responseCodeKey = find(objKey => responseCodes[objKey].code === infoCode, keys(responseCodes)); | |
| const message = responseCodes[responseCodeKey].message; |