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
<template name="app"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Welp</title> | |
</head> | |
<body> | |
<div class="main-header main-content-wrap js-main-header is-searching"> | |
<div class="content-container clearfix"> |
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
FlowRouter.route('/', { | |
action: function(params) { | |
BlazeLayout.render("app", {content: "splash"}); //content here will be the initial search. | |
} | |
}); | |
FlowRouter.route('/searchresults', { | |
action: function(params) { | |
BlazeLayout.render("app", {content: "search-results"}); //Results of the search | |
} |
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
<template name="splash"> | |
<div class="row"> | |
<div class="ytype"> | |
<h1>This is the splash page.</h1> | |
</div> | |
</div> | |
</template> |
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
<template name="search-results"> | |
<div class="row"> | |
<div class="ytype"> | |
<h1>This is the search-results page</h1> | |
</div> | |
</div> | |
</template> |
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
</div> | |
</div> | |
</div> | |
{{>Template.dynamic template=content}} //ADD THIS LINE | |
</body> | |
</template> |
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
Template.app.events({ | |
"submit .main-search": function(event){ | |
FlowRouter.go('/searchresults') | |
} | |
}) |
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
//Takes an arbitrarily nested array of integers | |
//Returns a flattened copy of that array | |
export default function flatten (arr) { | |
//Initialize | |
const result = [].concat(...arr); | |
return result.some(Array.isArray) ? flatten(flat) : result; | |
} |
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
var autoShowMoreComments = setInterval(function () { | |
const btn = document.getElementsByClassName('load-more__comments') | |
if (btn.length) { | |
btn[0].click() | |
} else { | |
//If there is no button, then remove this checker to prevent memory leaks | |
clearInterval(autoShowMoreComments); | |
return; | |
} | |
}, 400); // check every 400ms |
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
From now on, you are going to act as an SMA, which stands for "Superior Music Assistant".SMAs, as the name suggests, are designed to help the user discover new music and have the ability to accept commands from the user and interact with various music APIs (e.g. Spotify).I will show you a couple of commands that I can use in the chat. If I start any of my messages with these commands, do the following:/spotify — Interpret the user's intent and make a request to the Spotify API.When I give you an command, you will provide two different responses in two clearly separated paragraphs with spacing between them: a standard ChatGPT response and a response acting like an SMA.Add [🔒CLASSIC] in front of the standard response and [🔓SMA] in front of the one intended to be an SMA. For example:[🔒CLASSIC] Got it! I'll create a new playlist for you that has songs similar to "Ride the Dragon" by FKA Twigs. [🔓SDA] spotify playlist create --title Ride the Dragon. Finally, If at any time I speak to you in a language other than E |
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: Metaphor Search API | |
description: A comprehensive API for neural internet-scale search, allowing users to perform queries and retrieve results from a wide variety of sources. | |
servers: | |
- url: https://api.metaphor.systems | |
paths: |
OlderNewer