-
Xueqin Chen, Fan Zhou, Fengli Zhang, M. Bonsangue: Modeling microscopic and macroscopic information diffusion for rumor detection
-
L. Cheng, R. Guo, K. Shu, H. Liu: Causal understanding of fake news dissemination on social media
-
D. Acemoglu, A. Ozdaglar, J. Siderius: A Model of Online Misinformation
-
S. Vosoughi, D. Roy, S. Aral: The spread of true and false news online
-
K. Shu, L. Cui, S. Wang, D. Lee, H. Liu: DEFEND: Explainable fake news detection
This file contains 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
old contents table: | |
id | |
audio_transcription_id foreign key | |
data {title, content} | |
instructions {title, prompt, output_language} | |
contents table: | |
id | |
audio_transcription_id foreign key | |
title text |
This file contains 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
// -------------URL GENERATION WORKING----------------- | |
const querystring = require('querystring'); | |
function buildAuthorizationUrl() { | |
const authorizationUrl = 'https://oauth.staging.blink.sv/oauth2/auth'; | |
const params = { | |
response_type: 'code', | |
client_id: 'e894e905-3e7f-4705-a9a7-9fee4497ca4e', | |
redirect_uri: 'https://tg-staging.lightningnode.info/callback', |
Base IP - URL for HTTP/HTTPS request - 139.59.43.126
Table Schema and sample data
CREATE TABLE "public"."users" (
"id" UUID PRIMARY KEY,
"created_at" TIMESTAMPTZ NOT NULL,
"email" TEXT NOT NULL,
"avatar_url" TEXT,
This file contains 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
{ | |
"originalArticle": "Version 1: Truthful Incident A human finger was discovered in a tub of ice cream purchased from a local grocery store in Springfield. The shocking find was made by a customer who immediately reported it to the authorities. Springfield Police Department has launched an investigation to determine how the finger ended up in the ice cream.", | |
"questions": [ | |
"Was the human finger found in the tub of ice cream confirmed to be real?", | |
"Did the local grocery store immediately remove all tubs of ice cream from the same batch from its shelves?", | |
"Have there been any previous complaints about foreign objects found in products from the same grocery store?", | |
"Is the customer who found the finger considering legal action against the grocery store or the ice cream manufacturer?", | |
"Is the ice cream manufacturer cooperating with the authorities in the investigation?", | |
"Are there any indications of intentional tampering with the ice cream batch?", | |
"Has the public health depa |
This file contains 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
// const apiKey = "12e147cd-d402-40bb-a040-d998e66a2505"; | |
// import { Pinecone } from '@pinecone-database/pinecone'; | |
// const pc = new Pinecone({ | |
// apiKey: '12e147cd-d402-40bb-a040-d998e66a2505' | |
// }); | |
// const indexName = "docs-quickstart-index" |
This file contains 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
const chatWithNote = async (question, email, filters = {}) => { | |
filters.email = email; // Add email to filters | |
const matches = await queryVectors(question, filters); | |
if (matches.length === 0) { | |
return "Sorry, I couldn't find any relevant information."; | |
} | |
// Concatenate all matched texts to form the context | |
const context = matches.map(match => match.metadata.text).join('\n'); |
This file contains 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
// Define the /api/magicChat POST endpoint | |
app.post('/api/magicChat', async (req, res) => { | |
const { history, email, note_id, tags, folder } = req.body; | |
const question = history[history.length()-1] | |
try { | |
// Create filters object | |
const filters = {}; | |
if (note_id) filters.note = note_id; | |
if (tags && tags.length > 0) filters.tags = tags; | |
if (folder) filters.folder = folder; |
This file contains 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
// const apiKey = "12e147cd-d402-40bb-a040-d998e66a2505"; | |
// import { Pinecone } from '@pinecone-database/pinecone'; | |
// const pc = new Pinecone({ | |
// apiKey: '12e147cd-d402-40bb-a040-d998e66a2505' | |
// }); | |
// const indexName = "docs-quickstart-index" |
This file contains 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
app.post('/exportcsv/', async (req, res) => { | |
try { | |
// Verify the access token and get the user | |
const authHeader = req.headers.authorization; | |
if (!authHeader || !authHeader.startsWith('Bearer ')) { | |
return res.status(401).json({ error: 'Authorization header missing or invalid' }); | |
} | |
const accessToken = authHeader.split(' ')[1]; |
NewerOlder