18 modelName: "gpt-4",
19 temperature: 0.2,
20 openAIApiKey: process.env.OPENAI_API_KEY,
21 });
22 // Output parser converts the chat message into a raw string. Also works with streaming.
3// Github following
4export let githubFollowing = fetchJSON(
5 "https://api.github.com/users/stevekrouse/following"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
7export const getGithubStarsForRepo = async (username: string, project: string) => {
8 const res = await fetchJSON(
9 `https://api.github.com/repos/${username}/${project}`
10 );
11 return parseInt(res.stargazers_count);
3// Public holidays in the US in 2023
4export let holidaysUS = fetchJSON(
5 "https://date.nager.at/api/v2/publicholidays/2023/US"
6);
1import { myApi } from "https://esm.town/v/tylergaw/myApi";
2
3export const firstRun = myApi("Fishboy!");
1export async function getAllVideosInYoutubePlaylist(playlistId, apiKey) {
2 const { default: axios } = await import("npm:axios");
3 if (!playlistId) {
5 return null;
6 }
7 if (!apiKey) {
8 console.warn("API Key is Invalid");
9 return null;
10 }
12 return await axios({
13 method: "GET",
14 url: "https://www.googleapis.com/youtube/v3/playlistItems",
15 params: {
16 key: apiKey,
17 part: "contentDetails,id,snippet",
18 playlistId,
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}