Python
import honeyhive
from honeyhive.models import operations
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.configurations.get_configurations(project='<value>', env=operations.Env.DEV, name='<value>')
if res.configurations is not None:
# handle response
passimport { HoneyHive } from "honeyhive";
import { Env, GetConfigurationsRequest } from "honeyhive/dist/models/operations";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const project: string = "<value>";
const env: Env = Env.Dev;
const name: string = "<value>";
const res = await sdk.configurations.getConfigurations(project, env, name);
if (res.statusCode == 200) {
// handle response
}
}
run();curl --request GET \
--url https://api.honeyhive.ai/configurations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honeyhive.ai/configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.honeyhive.ai/configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/configurations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.honeyhive.ai/configurations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeyhive.ai/configurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"_id": "6638187d505c6812e4044f24",
"project": "New Project",
"type": {
"type": "string",
"enum": [
"LLM",
"pipeline"
],
"description": "Type of the configuration - \"LLM\" or \"pipeline\" - \"LLM\" by default"
},
"name": "function-v0",
"provider": "openai",
"parameters": {
"call_type": "chat",
"model": "gpt-4-turbo-preview",
"hyperparameters": {
"temperature": 0,
"max_tokens": 1000,
"top_p": 1,
"top_k": -1,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop_sequences": []
},
"responseFormat": {
"type": "text"
},
"selectedFunctions": [
{
"id": "64e3ba90e81f9b3a3808c27f",
"name": "get_google_information",
"description": "Get information from Google when you do not have that information in your context",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The query asked by the user"
}
},
"required": [
"query"
]
}
}
],
"functionCallParams": "auto",
"forceFunction": {},
"template": [
{
"role": "system",
"content": "You are a web search assistant."
},
{
"role": "user",
"content": "{{ query }}"
}
]
},
"env": [
"staging"
],
"tags": [],
"user_properties": {
"user_id": "google-oauth2|108897808434934946583",
"user_name": "Dhruv Singh",
"user_picture": "https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c",
"user_email": "dhruv@honeyhive.ai"
}
}
]Configurations
Retrieve a list of configurations
GET
/
configurations
Python
import honeyhive
from honeyhive.models import operations
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.configurations.get_configurations(project='<value>', env=operations.Env.DEV, name='<value>')
if res.configurations is not None:
# handle response
passimport { HoneyHive } from "honeyhive";
import { Env, GetConfigurationsRequest } from "honeyhive/dist/models/operations";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const project: string = "<value>";
const env: Env = Env.Dev;
const name: string = "<value>";
const res = await sdk.configurations.getConfigurations(project, env, name);
if (res.statusCode == 200) {
// handle response
}
}
run();curl --request GET \
--url https://api.honeyhive.ai/configurations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.honeyhive.ai/configurations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.honeyhive.ai/configurations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/configurations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.honeyhive.ai/configurations")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.honeyhive.ai/configurations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"_id": "6638187d505c6812e4044f24",
"project": "New Project",
"type": {
"type": "string",
"enum": [
"LLM",
"pipeline"
],
"description": "Type of the configuration - \"LLM\" or \"pipeline\" - \"LLM\" by default"
},
"name": "function-v0",
"provider": "openai",
"parameters": {
"call_type": "chat",
"model": "gpt-4-turbo-preview",
"hyperparameters": {
"temperature": 0,
"max_tokens": 1000,
"top_p": 1,
"top_k": -1,
"frequency_penalty": 0,
"presence_penalty": 0,
"stop_sequences": []
},
"responseFormat": {
"type": "text"
},
"selectedFunctions": [
{
"id": "64e3ba90e81f9b3a3808c27f",
"name": "get_google_information",
"description": "Get information from Google when you do not have that information in your context",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "The query asked by the user"
}
},
"required": [
"query"
]
}
}
],
"functionCallParams": "auto",
"forceFunction": {},
"template": [
{
"role": "system",
"content": "You are a web search assistant."
},
{
"role": "user",
"content": "{{ query }}"
}
]
},
"env": [
"staging"
],
"tags": [],
"user_properties": {
"user_id": "google-oauth2|108897808434934946583",
"user_name": "Dhruv Singh",
"user_picture": "https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c",
"user_email": "dhruv@honeyhive.ai"
}
}
]Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Project name for configuration like Example Project
Environment - "dev", "staging" or "prod"
Available options:
dev, staging, prod The name of the configuration like v0
Response
200 - application/json
An array of configurations
ID of the project to which this configuration belongs
Name of the configuration
Name of the provider - "openai", "anthropic", etc.
Show child attributes
Show child attributes
ID of the configuration
List of environments where the configuration is active
Available options:
dev, staging, prod Type of the configuration - "LLM" or "pipeline" - "LLM" by default
Available options:
LLM, pipeline Details of user who created the configuration
Was this page helpful?
⌘I

