Looking for latest HoneyHive v2? See v2 docs here.
import honeyhive
from honeyhive.models import components
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.datapoints.update_datapoint(id='<value>', update_datapoint_request=components.UpdateDatapointRequest(
inputs={
'query': 'what\'s the temperature in Reykjavik?',
},
history=[
{
'role': 'system',
'content': 'You are a helpful web assistant that helps users answer questions about the world based on the information provided to you by Google\'s search API. Answer the questions as truthfully as you can. In case you are unsure about the correct answer, please respond with "I apologize but I\'m not sure."',
},
{
'role': 'user',
'content': 'what\'s the temperature in Reykjavik?\n\n\n--Google search API results below:---\n\n"snippet":"2 Week Extended Forecast in Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early. Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing cloudiness.","snippet_highlighted_words":["Feb 4, 29 / 20 °F"]',
},
],
ground_truth={
'role': 'assistant',
'content': 'The temperature in Reykjavik, Iceland is currently around 5F or -15C. Please note that weather conditions can change rapidly, so it\'s best to check a reliable source for the most up-to-date information.',
},
linked_evals=[
'<value>',
],
linked_datasets=[
'<value>',
],
metadata={
'question_type': 'capital-weather',
'random_field': 0,
},
))
if res is not None:
# handle response
passimport honeyhive
from honeyhive.models import components
s = honeyhive.HoneyHive(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.datapoints.update_datapoint(id='<value>', update_datapoint_request=components.UpdateDatapointRequest(
inputs={
'query': 'what\'s the temperature in Reykjavik?',
},
history=[
{
'role': 'system',
'content': 'You are a helpful web assistant that helps users answer questions about the world based on the information provided to you by Google\'s search API. Answer the questions as truthfully as you can. In case you are unsure about the correct answer, please respond with "I apologize but I\'m not sure."',
},
{
'role': 'user',
'content': 'what\'s the temperature in Reykjavik?\n\n\n--Google search API results below:---\n\n"snippet":"2 Week Extended Forecast in Reykjavik, Iceland ; Feb 4, 29 / 20 °F · Snow showers early. Broken clouds. ; Feb 5, 27 / 16 °F · Light snow. Decreasing cloudiness.","snippet_highlighted_words":["Feb 4, 29 / 20 °F"]',
},
],
ground_truth={
'role': 'assistant',
'content': 'The temperature in Reykjavik, Iceland is currently around 5F or -15C. Please note that weather conditions can change rapidly, so it\'s best to check a reliable source for the most up-to-date information.',
},
linked_evals=[
'<value>',
],
linked_datasets=[
'<value>',
],
metadata={
'question_type': 'capital-weather',
'random_field': 0,
},
))
if res is not None:
# handle response
passDocumentation Index
Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
ID of datapoint to update
Arbitrary JSON object containing the inputs for the datapoint
Conversation history associated with the datapoint
Expected output JSON object for the datapoint
Ids of evaluations where the datapoint is included
Ids of all datasets that include the datapoint
Any additional metadata for the datapoint
Datapoint successfully updated
Was this page helpful?