Python
import honeyhive
from honeyhive.models import components
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.configurations.create_configuration(request=components.PostConfigurationRequest(
project='660d7ba7995cacccce4d299e',
name='function-v0',
provider='openai',
parameters=components.PostConfigurationRequestParameters(
call_type=components.PostConfigurationRequestCallType.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': [
'<value>',
],
},
selected_functions=[
components.PostConfigurationRequestSelectedFunctions(
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',
],
},
),
],
function_call_params=components.PostConfigurationRequestFunctionCallParams.AUTO,
force_function={
},
additional_properties={
'template': [
{
'role': 'system',
'content': 'You are a web search assistant.',
},
{
'role': 'user',
'content': '{{ query }}',
},
],
},
),
env=[
components.PostConfigurationRequestEnv.STAGING,
],
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',
},
))
if res is not None:
# handle response
passimport { HoneyHive } from "honeyhive";
import { PostConfigurationRequestEnv } from "honeyhive/dist/models/components";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const res = await sdk.configurations.createConfiguration({
project: "660d7ba7995cacccce4d299e",
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": [
"<value>",
],
},
"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: [
PostConfigurationRequestEnv.Staging,
],
userProperties: {
"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",
},
});
if (res.statusCode == 200) {
// handle response
}
}
run();curl --request POST \
--url https://api.honeyhive.ai/configurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project": "660d7ba7995cacccce4d299e",
"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": []
},
"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 }}"
}
]
},
"tags": [],
"env": [
"staging"
],
"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"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project: '660d7ba7995cacccce4d299e',
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: []
},
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 }}'}
]
},
tags: [],
env: ['staging'],
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'
}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project' => '660d7ba7995cacccce4d299e',
'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' => [
]
],
'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 }}'
]
]
],
'tags' => [
],
'env' => [
'staging'
],
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/configurations"
payload := strings.NewReader("{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.honeyhive.ai/configurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}"
response = http.request(request)
puts response.read_bodyConfigurations
Create a new configuration
POST
/
configurations
Python
import honeyhive
from honeyhive.models import components
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.configurations.create_configuration(request=components.PostConfigurationRequest(
project='660d7ba7995cacccce4d299e',
name='function-v0',
provider='openai',
parameters=components.PostConfigurationRequestParameters(
call_type=components.PostConfigurationRequestCallType.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': [
'<value>',
],
},
selected_functions=[
components.PostConfigurationRequestSelectedFunctions(
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',
],
},
),
],
function_call_params=components.PostConfigurationRequestFunctionCallParams.AUTO,
force_function={
},
additional_properties={
'template': [
{
'role': 'system',
'content': 'You are a web search assistant.',
},
{
'role': 'user',
'content': '{{ query }}',
},
],
},
),
env=[
components.PostConfigurationRequestEnv.STAGING,
],
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',
},
))
if res is not None:
# handle response
passimport { HoneyHive } from "honeyhive";
import { PostConfigurationRequestEnv } from "honeyhive/dist/models/components";
async function run() {
const sdk = new HoneyHive({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
const res = await sdk.configurations.createConfiguration({
project: "660d7ba7995cacccce4d299e",
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": [
"<value>",
],
},
"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: [
PostConfigurationRequestEnv.Staging,
],
userProperties: {
"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",
},
});
if (res.statusCode == 200) {
// handle response
}
}
run();curl --request POST \
--url https://api.honeyhive.ai/configurations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project": "660d7ba7995cacccce4d299e",
"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": []
},
"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 }}"
}
]
},
"tags": [],
"env": [
"staging"
],
"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"
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project: '660d7ba7995cacccce4d299e',
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: []
},
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 }}'}
]
},
tags: [],
env: ['staging'],
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'
}
})
};
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 => "POST",
CURLOPT_POSTFIELDS => json_encode([
'project' => '660d7ba7995cacccce4d299e',
'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' => [
]
],
'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 }}'
]
]
],
'tags' => [
],
'env' => [
'staging'
],
'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'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.honeyhive.ai/configurations"
payload := strings.NewReader("{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.honeyhive.ai/configurations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}")
.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::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project\": \"660d7ba7995cacccce4d299e\",\n \"name\": \"function-v0\",\n \"provider\": \"openai\",\n \"parameters\": {\n \"call_type\": \"chat\",\n \"model\": \"gpt-4-turbo-preview\",\n \"hyperparameters\": {\n \"temperature\": 0,\n \"max_tokens\": 1000,\n \"top_p\": 1,\n \"top_k\": -1,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"stop_sequences\": []\n },\n \"selectedFunctions\": [\n {\n \"id\": \"64e3ba90e81f9b3a3808c27f\",\n \"name\": \"get_google_information\",\n \"description\": \"Get information from Google when you do not have that information in your context\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"query\": {\n \"type\": \"string\",\n \"description\": \"The query asked by the user\"\n }\n },\n \"required\": [\n \"query\"\n ]\n }\n }\n ],\n \"functionCallParams\": \"auto\",\n \"forceFunction\": {},\n \"template\": [\n {\n \"role\": \"system\",\n \"content\": \"You are a web search assistant.\"\n },\n {\n \"role\": \"user\",\n \"content\": \"{{ query }}\"\n }\n ]\n },\n \"tags\": [],\n \"env\": [\n \"staging\"\n ],\n \"user_properties\": {\n \"user_id\": \"google-oauth2|108897808434934946583\",\n \"user_name\": \"Dhruv Singh\",\n \"user_picture\": \"https://lh3.googleusercontent.com/a/ACg8ocLyQilNtK9RIv4M0p-0FBSbxljBP0p5JabnStku1AQKtFSK=s96-c\",\n \"user_email\": \"dhruv@honeyhive.ai\"\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Name 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
List of environments where the configuration is active
Available options:
dev, staging, prod Details of user who created the configuration
Response
200
Configuration created successfully
Was this page helpful?
⌘I

