Events
Datapoints
Datasets
Projects
Experiments
Configurations
Create a new configuration
POST
/
configurations
Copy
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
pass
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
Configuration created successfully
Was this page helpful?
Copy
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
pass
Assistant
Responses are generated using AI and may contain mistakes.