use shuguang's prompt targets

This commit is contained in:
Adil Hafeez 2025-02-05 16:12:41 -08:00
parent b960862baf
commit 8d59586dfb
No known key found for this signature in database
GPG key ID: 9B18EF7691369645
2 changed files with 11 additions and 17 deletions

View file

@ -322,16 +322,6 @@ impl StreamContext {
let (path, body) = match http_method { let (path, body) = match http_method {
HttpMethod::Get => { HttpMethod::Get => {
let additional_params_query = additional_params
.iter()
.map(|(k, v)| format!("{}={}", k, v))
.collect::<Vec<String>>()
.join("&");
let query_string = if query_string.is_empty() {
additional_params_query
} else {
format!("{}&{}", query_string, additional_params_query)
};
(format!("{}?{}", path_with_params, query_string), None) (format!("{}?{}", path_with_params, query_string), None)
} }
HttpMethod::Post => { HttpMethod::Post => {

View file

@ -86,28 +86,33 @@ llm_providers:
prompt_targets: prompt_targets:
- name: get_new_releases - name: get_new_releases
description: Get a list of new album releases featured in Spotify (shown, for example, on a Spotify players “Browse” tab).
parameters: parameters:
- name: country - name: country
description: the country where the album is released description: the country where the album is released
required: true required: true
type: str type: str
in_path: true in_path: true
- name: limit
type: integer
description: The maximum number of results to return
default: "5"
endpoint: endpoint:
name: spotify name: spotify
path: /v1/browse/new-releases?limit=5 path: /v1/browse/new-releases
http_headers: http_headers:
Authorization: "Bearer $SPOTIFY_CLIENT_KEY" Authorization: "Bearer $SPOTIFY_CLIENT_KEY"
description: Get a list of new album releases featured in Spotify (shown, for example, on a Spotify players “Browse” tab).
- name: get_catalog_information - name: search_for_item
description: Get information about albums, artists, playlists, tracks, shows, episodes or audiobooks. You can search for an item by its name, creator, or topic.
parameters: parameters:
- name: q - name: q
description: keywords to search about catalog description: Your search query, which can include keywords related to the item name, its creator, or its topic.
required: true required: true
type: str type: str
- name: type - name: type
type: str type: str
description: The type of catalog item description: The type of the item to search for (e.g., album, artist, playlist, track, show, episode, audiobook).
enum: enum:
- album - album
- artist - artist
@ -119,7 +124,7 @@ prompt_targets:
required: true required: true
- name: market - name: market
type: str type: str
description: A country code for catalog description: A country code
default: US default: US
- name: limit - name: limit
type: integer type: integer
@ -130,4 +135,3 @@ prompt_targets:
path: /v1/search path: /v1/search
http_headers: http_headers:
Authorization: "Bearer $SPOTIFY_CLIENT_KEY" Authorization: "Bearer $SPOTIFY_CLIENT_KEY"
description: Get Spotify catalog information about albums, artists, playlists, tracks, shows, episodes or audiobooks that match a keyword string.