Search

Results include substring matches and semantically similar vals. Learn more
jacoblee93 avatar
untitled_silverPinniped
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
const { ChatPromptTemplate } = await import("npm:langchain/prompts");
const { ChatOpenAI } = await import("npm:langchain/chat_models/openai");
const { StringOutputParser } = await import(
["human", "{input}"],
const model = new ChatOpenAI({
modelName: "gpt-4",
temperature: 0.2,
openAIApiKey: process.env.OPENAI_API_KEY,
// Output parser converts the chat message into a raw string. Also works with streaming.
jacoblee93 avatar
untitled_chocolateSquid
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
export const untitled_chocolateSquid = (async () => {
const { ChatOpenAI } = await import(
"https://esm.sh/langchain@0.0.146/chat_models/openai"
const { LLMChain } = await import("https://esm.sh/langchain@0.0.146/chains");
["human", humanTemplate],
const chat = new ChatOpenAI({
temperature: 0,
openAIApiKey: process.env.OPENAI_API_KEY,
const chain = new LLMChain({
stevekrouse avatar
untitled_orangeImpala
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export const untitled_orangeImpala = fetchJSON(
"https://api.openai.com/v1/usage?date=2023-11-01",
headers: {
authorization: "Bearer " + Deno.env.get("openai"),
cyrilis avatar
untitled2983099
@cyrilis
An interactive, runnable TypeScript val by cyrilis
Script
export let untitled2983099 = default (params) => {
return gpt3({
openAiKey: process.env.openai_key,
prompt: params.question,
.then((result) => result);
cyrilis avatar
untitled8745444
@cyrilis
An interactive, runnable TypeScript val by cyrilis
Script
export let untitled8745444 = default (params) => {
return gpt3({
openAiKey: process.env.openai_key,
prompt: params.question,
.then((result) => result);
cyrilis avatar
untitled8294445
@cyrilis
An interactive, runnable TypeScript val by cyrilis
Script
export let untitled8294445 = default (params) => {
return gpt3({
openAiKey: process.env.openai_key,
prompt: params.question,
.then((result) => result);
gayatri_k26 avatar
untitled_pinkMarmoset
@gayatri_k26
An interactive, runnable TypeScript val by gayatri_k26
Cron
function x() {
console.log("Welcome to CS1200!");
console.log("Hello there!");
xuesjiang avatar
untitled_magentaBee
@xuesjiang
An interactive, runnable TypeScript val by xuesjiang
Script
export async function untitled_magentaBee() {
const { default: axios } = await import("npm:axios");
const url =
zachnusbaum avatar
untitled_rt2wovqo
@zachnusbaum
An interactive, runnable TypeScript val by zachnusbaum
Script
export const untitled_rt2wovqo = (async () => {
function myApi(name) {
return "hi " + name;
console.email("hi");
hankenstein avatar
untitled_oliveSwordtail
@hankenstein
An interactive, runnable TypeScript val by hankenstein
Script
export const untitled_oliveSwordtail = (async () => {
var name = "hank";
function myApi(name) {
return "hi " + name;
baj avatar
untitled_cS5pGEaV
@baj
An interactive, runnable TypeScript val by baj
Script
export const untitled_cS5pGEaV = (async () => {
let count = 0;
function myApi() {
return count++;
maxmetcalfe avatar
untitled6597015
@maxmetcalfe
An interactive, runnable TypeScript val by maxmetcalfe
Script
export let untitled6597015 = default async function() {
console.log("here")
aravgoyalneu avatar
untitled_blushLobster
@aravgoyalneu
An interactive, runnable TypeScript val by aravgoyalneu
Email
export async function untitled_blushLobster(email: Email) {
async function emailRandomJoke() {
async function fetchRandomJoke() {
const response = await fetch(
maxmetcalfe avatar
untitled6709436
@maxmetcalfe
An interactive, runnable TypeScript val by maxmetcalfe
Script
export let untitled6709436 = default async function() {
console.log("here")
zhangbao avatar
untitled_emeraldFalcon
@zhangbao
An interactive, runnable TypeScript val by zhangbao
HTTP
export default async function untitled_redMeerkat(req: Request): Promise<Response> {
return Response.json({ ok: true })