Search

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.

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({

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"),
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);
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);
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);
untitled_pinkMarmoset
@gayatri_k26
An interactive, runnable TypeScript val by gayatri_k26
Cron
function x() {
console.log("Welcome to CS1200!");
console.log("Hello there!");
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 =

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");
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;

untitled_cS5pGEaV
@baj
An interactive, runnable TypeScript val by baj
Script
export const untitled_cS5pGEaV = (async () => {
let count = 0;
function myApi() {
return count++;
untitled6597015
@maxmetcalfe
An interactive, runnable TypeScript val by maxmetcalfe
Script
export let untitled6597015 = default async function() {
console.log("here")
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(