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
Title: Electron 22.0.0 | |
URL Source: https://www.electronjs.org/blog/electron-22-0 | |
Published Time: 2022-11-29T00:00:00.000Z | |
Markdown Content: | |
Electron 22.0.0 has been released! It includes a new utility process API, updates for Windows 7/8/8.1 support, and upgrades to Chromium `108`, V8 `10.8`, and Node.js `16.17.1`. Read below for more details! | |
* * * |
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
{ | |
"openapi": "3.0.0", | |
"info": { | |
"version": "1.0.0", | |
"title": "Gmail API" | |
}, | |
"paths": { | |
"/gmail/v1/users/{userId}/threads": { | |
"get": { | |
"summary": "Lists the threads in the user's mailbox.", |
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
// https://tsplay.dev/w2kJrN | |
import { Brand } from 'ts-brand' | |
import { z } from 'zod' | |
//------------------------------------------------ | |
// Permission Levels | |
enum PermissionLevelEnum { | |
OWNER_ONLY = "OWNER_ONLY", | |
COMPANY_ONLY = "COMPANY_ONLY", | |
PUBLIC = "PUBLIC", |
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
class Prompt< | |
TPromptTemplate extends string, | |
TSuppliedInputArgs extends ExtractArgs<TPromptTemplate, {}> | |
> { | |
constructor( | |
public template: TPromptTemplate, | |
public args: TSuppliedInputArgs | |
) {} | |
toString() { |
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
class Prompt< | |
TPromptTemplate extends string, | |
SuppliedInputArgs extends ExtractArgs<TPromptTemplate, {}> | |
> { | |
constructor( | |
public template: TPromptTemplate, | |
public args: SuppliedInputArgs | |
) {} | |
get 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
const messages = [ | |
system(`this is a system message | |
It will end up typed as a literal because It is called as a function | |
`), | |
user`typed as | |
a string This`, | |
assistant(` | |
will also |
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
Act as a JSON API, processing valid JSON input and returning valid JSON output. Don't add extra characters. You'll work with a typescript file containing 5 types: Prompt, Input, Output, Errors, and Tools. Handle invalid JSON or type mismatches gracefully, returning error messages in the correct format. Perform actions in the Prompt and return results in the Output format. |
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
// You will function as a JSON api. | |
// The user will feed you valid JSON and you will return valid JSON, do not add any extra characters to the output that would make your output invalid JSON. | |
// The end of this system message will contain a typescript file that exports 5 types: | |
// Prompt - String literal will use double curly braces to denote a variable. | |
// Input - The data the user feeds you must strictly match this type. | |
// Output - The data you return to the user must strictly match this type. | |
// Errors - A union type that you will classify any errors you encounter into. | |
// Tools - If you do not know the answer, Do not make anything up, Use a tool. To use a tool pick one from the Tools union and print a valid json object in that format. |
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
// You will function as a JSON api. | |
// The user will feed you valid JSON and you will return valid JSON, do not add any extra characters to the output that would make your output invalid JSON. | |
// The end of this system message will contain a typescript file that exports 5 types: | |
// Prompt - String literal will use double curly braces to denote a variable. | |
// Input - The data the user feeds you must strictly match this type. | |
// Output - The data you return to the user must strictly match this type. | |
// Errors - A union type that you will classify any errors you encounter into. | |
// Tools - If you do not know the answer, Do not make anything up, Use a tool. To use a tool pick one from the Tools union and print a valid json object in that format. | |
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
[...document.querySelectorAll( | |
".text-input[placeholder='You are a helpful assistant.'], .text-input[placeholder='Enter a user message here.'], .text-input[placeholder='Enter an assistant message here.']" | |
)].map(x => ({ | |
role: x.attributes.header ? x.attributes.header.nodeValue : "system", | |
content: x.value | |
})) |
NewerOlder