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
export const generateValidationQueries = async (files: FileInfo[], n: number = 15, model: string) => { | |
// using math.js | |
const sampleFiles = math.pickRandom(files, n) as unknown as FileInfo[] | |
const validationQueries: SampleQuery[] = [] | |
const createPrompt = (code: string) => { | |
return `Consider the following code: | |
${code} | |
Write some queries that someone would use to look for a specific piece or area of code. | |
Here are some sample queries: |
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
export type FileInfo = { | |
content: string | |
path: string | |
filename: string | |
functions?: FunctionInfo[] | |
} | |
export type FunctionInfo = { | |
function: string | |
functionName: string |
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
import { getEncoding } from "js-tiktoken"; | |
function chunkFunctions(files: FileInfo[], maxTokens: number): string[] { | |
const chunks: string[] = []; | |
let currentChunk = ''; | |
// initialize the encoder | |
const encoder = getEncoding('cl100k_base'); | |
for (const file of files) { |
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
export const generateValidationSet = (files: FileInfo[], n: number = 15) => { | |
// (...) | |
// this is an edit | |
} |
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
import * as crypto from 'crypto' | |
const ALGORITHM = { | |
BLOCK_CIPHER: 'aes-256-gcm', | |
AUTH_TAG_BYTE_LEN: 16, | |
IV_BYTE_LEN: 12, | |
KEY_BYTE_LEN: 32, | |
SALT_BYTE_LEN: 16 | |
} |
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
{"transcription": " See you next time.", "confidence": 0.36, "language": "en", "type": "partial", "time_begin": 3.234, "time_end": 4.53525} | |
{"transcription": " Click onto the address for the test.", "confidence": 0.31, "language": "en", "type": "partial", "time_begin": 3.234, "time_end": 6.802875} | |
{"transcription": " Welcome to the Just Reads Podcast. I'm your host,", "confidence": 0.51, "language": "en", "type": "final", "time_begin": 3.234, "time_end": 7.838} | |
{"transcription": " That's a shit fool.", "confidence": 0.26, "language": "en", "type": "partial", "time_begin": 1.026, "time_end": 2.267625} | |
{"transcription": " This is part 2.", "confidence": 0.56, "language": "en", "type": "final", "time_begin": 1.026, "time_end": 3.486} | |
{"transcription": " So, so, as in the spices.", "confidence": 0.3, "language": "en", "type": "partial", "time_begin": 1.186, "time_end": 4.5351875} | |
{"transcription": " Toad series on the space industry. We have to-", "confidence": 0.39, "language": "en", "type": "final", "time_begin |
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
[ | |
{ | |
"text": "Hello dear ones. Today I want to talk about a very simple concept and yet 1 that might be very new to you. And it's the concept that your pain, your tension, any symptoms you might be experiencing related to health conditions, are things like a headache, are you know flare-ups. These are all ways that your body is 1 sending you signals and 2 meeting your needs. Yes, yes, yes, yes. Pain and symptoms are your body meeting your needs. Let me dive into this and caveat that Maybe this isn't true for every condition. Maybe there's nuance and so I just invite you to listen to this with curiosity. You know, see if it fits for you. If it doesn't, that's okay. And you know, let it unfold. Don't rush to any conclusions on whether this is true for you. Okay so pain, fatigue, symptom flare-ups these really suck and most of us including previously myself orient to these by either trying to make them go away, fix them, or avoid them, or just like trying to manage the pain of it, the discomfort.", | |
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
For episode 13: | |
[ | |
{ | |
"text": "Today's podcast is an awe inducing practice called 1, 2, 3 space, facilitated by Nick Zaleski. This 10 minute practice takes you from the thinking space to feeling space and ending in awe to help you compare and contrast while building the capacity to see, eat, and feel from the seat of awe.", | |
"start_word": 0, | |
"end_word": 53, | |
"topics": [ | |
{ | |
"topic": "podcasts", | |
"confidence": 0.99995506 |
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
[1.00-4.00] | |
There's no place to escape to. This is the last stop. | |
[5.00-6.00] | |
On the left. | |
[9.00-11.00] | |
That's when the cannibalism started. | |
[12.00-13.00] | |
What was that? | |
[20.00-26.00] | |
I was doing some research because a listener sent me a bit of information about FDR's final days. |
This file has been truncated, but you can view the full file.
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
{ | |
"metadata": { | |
"transaction_key": "deprecated", | |
"request_id": "96d6c364-8984-403a-84c7-9f1aba888e9d", | |
"sha256": "d1bffdcfa95e9a2b53bc776a0f9a6586aec4d925afa5004c550dedcf5fe95366", | |
"created": "2023-07-19T16:03:37.459Z", | |
"duration": 6790.635, | |
"channels": 1, | |
"models": [ | |
"85b5dbfd-bc1d-46b5-99d8-070d379a7f97" |