import { searchSpotifyTracks } from "../spotify-api.ts"; import { GetNewSuggestInput, GetNewSuggestOutput } from "../types/api.ts"; import { generateVibes } from "../ai-suggestion.ts"; export async function getNewSuggestion( params: GetNewSuggestInput, ): Promise { const ai_suggestion = await generateVibes(params); const suggestionResults = await searchSpotifyTracks( ai_suggestion.songs, ); return { songs: suggestionResults }; }