-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
56 additions
and
80 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export default class ResponseBuilder { | ||
constructor() { | ||
} | ||
|
||
getJsonResponse(resultJson) { | ||
return new Response(JSON.stringify(resultJson), { | ||
headers: { | ||
'content-type': 'application/json;charset=UTF-8', | ||
}, | ||
}) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import ResponseBuilder from "../../../edge-src/common/ResponseBuilder"; | ||
|
||
const pluginSpec = { | ||
"schema_version": "v1", | ||
"name_for_human": "Listen Notes", | ||
"name_for_model": "PodcastDatabase", | ||
"description_for_human": "The best podcast search engine and database. Search 160+ million podcast episodes by topic or people", | ||
"description_for_model": "Plugin for searching podcasts and episodes. Always use listennotes_url from the response data for the link of a podcast or an episode. Don't make up your own link.", | ||
"auth": { | ||
"type": "service_http", | ||
"authorization_type": "bearer", | ||
"verification_tokens": { | ||
"openai": "2af42ffda4fa46718bbcb21562234c38" | ||
} | ||
}, | ||
"api": { | ||
"type": "openapi", | ||
"url": "https://ai.listennotes.com/chatgpt-plugin/openapi.json" | ||
}, | ||
"logo_url": "https://ai.listennotes.com/assets/android-chrome-512x512.png", | ||
"contact_email": "hello@listennotes.com", | ||
"legal_info_url": "https://ai.listennotes.com/legal.txt" | ||
} | ||
|
||
export async function onRequestGet(context) { | ||
const responseBuilder = new ResponseBuilder(context) | ||
|
||
return responseBuilder.getJsonResponse(pluginSpec) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import ResponseBuilder from "../../../edge-src/common/ResponseBuilder"; | ||
|
||
const openapiSpec = { | ||
info: 'hello' | ||
} | ||
|
||
export async function onRequestGet(context) { | ||
const responseBuilder = new ResponseBuilder(context) | ||
|
||
return responseBuilder.getJsonResponse(openapiSpec) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.