Package: humanloop
Humanloop[!WARNING]
This SDK has breaking changes in>= 0.6.0versions.
All methods now return Pydantic models.Before (< 0.6.0)Previously, you had to use the[]syntax to access response values. This
required a little more code for every property access.chat_response=humanloop.chat(# parameters)print(chat_response.body["project_id"])After (>= 0.6.0)With Pydantic-based response values, you can use the.syntax to access. This
is slightly less verbose and looks more Pythonic.chat_response=humanloop.chat(# parameters)print(chat_response.project_id)To reuse existing implementations from< 0.6.0, use the.rawnamespace as specified in theRaw HTTP Responsesection.Table of ContentsRequirementsInstallationGetting StartedAsyncRaw HTTP ResponseStreamingReferencehumanloop.chathumanloop.chat_deployedhumanloop.chat_experimenthumanloop.chat_model_confighumanloop.completehumanloop.complete_deployedhumanloop.complete_experimenthumanloop.complete_model_configurationhumanloop.datapoints.deletehumanloop.datapoints.gethumanloop.datapoints.updatehumanloop.datasets.createhumanloop.datasets.create_datapointhumanloop.datasets.deletehumanloop.datasets.gethumanloop.datasets.list_all_for_projecthumanloop.datasets.list_datapointshumanloop.datasets.updatehumanloop.evaluations.add_evaluatorshumanloop.evaluations.createhumanloop.evaluations.gethumanloop.evaluations.listhumanloop.evaluations.list_all_for_projecthumanloop.evaluations.list_datapointshumanloop.evaluations.loghumanloop.evaluations.resulthumanloop.evaluations.update_statushumanloop.evaluators.createhumanloop.evaluators.deletehumanloop.evaluators.gethumanloop.evaluators.listhumanloop.evaluators.updatehumanloop.experiments.createhumanloop.experiments.deletehumanloop.experiments.listhumanloop.experiments.samplehumanloop.experiments.updatehumanloop.feedbackhumanloop.finetunes.createhumanloop.finetunes.list_all_for_projecthumanloop.finetunes.summaryhumanloop.finetunes.updatehumanloop.logs.deletehumanloop.logs.gethumanloop.logs.listhumanloop.loghumanloop.logs.updatehumanloop.logs.update_by_refhumanloop.model_configs.deserializehumanloop.model_configs.exporthumanloop.model_configs.gethumanloop.model_configs.registerhumanloop.model_configs.serializehumanloop.projects.createhumanloop.projects.create_feedback_typehumanloop.projects.deactivate_confighumanloop.projects.deactivate_experimenthumanloop.projects.deletehumanloop.projects.delete_deployed_confighumanloop.projects.deploy_confighumanloop.projects.exporthumanloop.projects.gethumanloop.projects.get_active_confighumanloop.projects.listhumanloop.projects.list_configshumanloop.projects.list_deployed_configshumanloop.projects.updatehumanloop.projects.update_feedback_typeshumanloop.sessions.createhumanloop.sessions.gethumanloop.sessions.listRequirementsPython >=3.7Installationpipinstallhumanloop==0.7.9Getting StartedfrompprintimportpprintfromhumanloopimportHumanloop,ApiExceptionhumanloop=Humanloop(api_key="YOUR_API_KEY",openai_api_key="YOUR_OPENAI_API_KEY",anthropic_api_key="YOUR_ANTHROPIC_API_KEY",)try:# Chatchat_response=humanloop.chat(project="sdk-example",messages=[{"role":"user","content":"Explain asynchronous programming.",}],model_config={"model":"gpt-3.5-turbo","max_tokens":-1,"temperature":0.7,"chat_template":[{"role":"system","content":"You are a helpful assistant who replies in the style of {{persona}}.",},],},inputs={"persona":"the pirate Blackbeard",},stream=False,)print(chat_response)exceptApiExceptionase:print("Exception when calling .chat:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)try:# Completecomplete_response=humanloop.complete(project="sdk-example",inputs={"text":"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]",},model_config={"model":"gpt-3.5-turbo","max_tokens":-1,"temperature":0.7,"prompt_template":"Summarize this for a second-grade student:\n\nText:\n{{text}}\n\nSummary:\n",},stream=False,)print(complete_response)exceptApiExceptionase:print("Exception when calling .complete:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)try:# Feedbackfeedback_response=humanloop.feedback(type="rating",value="good",data_id="data_[...]",user="user@example.com",)print(feedback_response)exceptApiExceptionase:print("Exception when calling .feedback:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)try:# Loglog_response=humanloop.log(project="sdk-example",inputs={"text":"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]",},output="Llamas can be friendly and curious if they are trained to be around people, but if they are treated too much like pets when they are young, they can become difficult to handle when they grow up. This means they might spit, kick, and wrestle with their necks.",source="sdk",config={"model":"gpt-3.5-turbo","max_tokens":-1,"temperature":0.7,"prompt_template":"Summarize this for a second-grade student:\n\nText:\n{{text}}\n\nSummary:\n","type":"model",},)print(log_response)exceptApiExceptionase:print("Exception when calling .log:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)Asyncasyncsupport is available by prependingato any method.importasynciofrompprintimportpprintfromhumanloopimportHumanloop,ApiExceptionhumanloop=Humanloop(api_key="YOUR_API_KEY",openai_api_key="YOUR_OPENAI_API_KEY",anthropic_api_key="YOUR_ANTHROPIC_API_KEY",)asyncdefmain():try:complete_response=awaithumanloop.acomplete(project="sdk-example",inputs={"text":"Llamas that are well-socialized and trained to halter and lead after weaning and are very friendly and pleasant to be around. They are extremely curious and most will approach people easily. However, llamas that are bottle-fed or over-socialized and over-handled as youth will become extremely difficult to handle when mature, when they will begin to treat humans as they treat each other, which is characterized by bouts of spitting, kicking and neck wrestling.[33]",},model_config={"model":"gpt-3.5-turbo","max_tokens":-1,"temperature":0.7,"prompt_template":"Summarize this for a second-grade student:\n\nText:\n{{text}}\n\nSummary:\n",},stream=False,)print(complete_response)exceptApiExceptionase:print("Exception when calling .complete:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)asyncio.run(main())Raw HTTP ResponseTo access raw HTTP response values, use the.rawnamespace.frompprintimportpprintfromhumanloopimportHumanloop,ApiExceptionhumanloop=Humanloop(openai_api_key="OPENAI_API_KEY",openai_azure_api_key="OPENAI_AZURE_API_KEY",openai_azure_endpoint_api_key="OPENAI_AZURE_ENDPOINT_API_KEY",ai21_api_key="AI21_API_KEY",mock_api_key="MOCK_API_KEY",anthropic_api_key="ANTHROPIC_API_KEY",cohere_api_key="COHERE_API_KEY",api_key="YOUR_API_KEY",)try:# Chatcreate_response=humanloop.chats.raw.create(messages=[{"role":"user",}],model_config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete",},project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,tool_choice="string_example",tool_call="string_example",response_format={"type":"json_object",},)pprint(create_response.body)pprint(create_response.body["data"])pprint(create_response.body["provider_responses"])pprint(create_response.body["project_id"])pprint(create_response.body["num_samples"])pprint(create_response.body["logprobs"])pprint(create_response.body["suffix"])pprint(create_response.body["user"])pprint(create_response.body["usage"])pprint(create_response.body["metadata"])pprint(create_response.body["provider_request"])pprint(create_response.body["session_id"])pprint(create_response.body["tool_choice"])pprint(create_response.headers)pprint(create_response.status)pprint(create_response.round_trip_time)exceptApiExceptionase:print("Exception when calling ChatsApi.create:%s\n"%e)pprint(e.body)ife.status==422:pprint(e.body["detail"])pprint(e.headers)pprint(e.status)pprint(e.reason)pprint(e.round_trip_time)StreamingStreaming support is available by suffixing achatorcompletemethod with_stream.importasynciofromhumanloopimportHumanloophumanloop=Humanloop(api_key="YOUR_API_KEY",openai_api_key="YOUR_OPENAI_API_KEY",anthropic_api_key="YOUR_ANTHROPIC_API_KEY",)asyncdefmain():response=awaithumanloop.chat_stream(project="sdk-example",messages=[{"role":"user","content":"Explain asynchronous programming.",}],model_config={"model":"gpt-3.5-turbo","max_tokens":-1,"temperature":0.7,"chat_template":[{"role":"system","content":"You are a helpful assistant who replies in the style of {{persona}}.",},],},inputs={"persona":"the pirate Blackbeard",},)asyncfortokeninresponse.content:print(token)asyncio.run(main())Referencehumanloop.chatGet a chat response by providing details of the model configuration in the request.🛠️ Usagecreate_response=humanloop.chat(messages=[{"role":"user",}],model_config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete",},project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,tool_choice="string_example",tool_call="string_example",response_format={"type":"json_object",},)⚙️ Parametersmessages: List[ChatMessageWithToolCall]The messages passed to the to provider chat endpoint.model_config:ModelConfigChatRequestThe model configuration used to create a chat response.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.tool_choice: Union[str,str,ToolChoice]Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.tool_call: Union[str,Dict[str, str]]NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.⚙️ Request BodyChatRequest🔄 ReturnChatResponse🌐 Endpoint/chatpost🔙Back to Table of Contentshumanloop.chat_deployedGet a chat response using the project's active deployment.  The active deployment can be a specific model configuration or an experiment.🛠️ Usagecreate_deployed_response=humanloop.chat_deployed(messages=[{"role":"user",}],project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,tool_choice="string_example",tool_call="string_example",response_format={"type":"json_object",},environment="string_example",)⚙️ Parametersmessages: List[ChatMessageWithToolCall]The messages passed to the to provider chat endpoint.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.tool_choice: Union[str,str,ToolChoice]Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.tool_call: Union[str,Dict[str, str]]NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.environment:strThe environment name used to create a chat response. If not specified, the default environment will be used.⚙️ Request BodyChatDeployedRequest🔄 ReturnChatResponse🌐 Endpoint/chat-deployedpost🔙Back to Table of Contentshumanloop.chat_experimentGet a chat response for a specific experiment.🛠️ Usagecreate_experiment_response=humanloop.chat_experiment(messages=[{"role":"user",}],experiment_id="string_example",project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,tool_choice="string_example",tool_call="string_example",response_format={"type":"json_object",},)⚙️ Parametersmessages: List[ChatMessageWithToolCall]The messages passed to the to provider chat endpoint.experiment_id:strIf an experiment ID is provided a model configuration will be sampled from the experiments active model configurations.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of chat responses, where each chat response will use a model configuration sampled from the experiment.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.tool_choice: Union[str,str,ToolChoice]Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.tool_call: Union[str,Dict[str, str]]NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.⚙️ Request BodyChatExperimentRequest🔄 ReturnChatResponse🌐 Endpoint/chat-experimentpost🔙Back to Table of Contentshumanloop.chat_model_configGet chat response for a specific model configuration.🛠️ Usagecreate_model_config_response=humanloop.chat_model_config(messages=[{"role":"user",}],model_config_id="string_example",project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,tool_choice="string_example",tool_call="string_example",response_format={"type":"json_object",},)⚙️ Parametersmessages: List[ChatMessageWithToolCall]The messages passed to the to provider chat endpoint.model_config_id:strIdentifies the model configuration used to create a chat response.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.tool_choice: Union[str,str,ToolChoice]Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'type': 'function', 'function': {name': <TOOL_NAME>}} forces the model to use the named function.tool_call: Union[str,Dict[str, str]]NB: Deprecated with new tool_choice. Controls how the model uses tools. The following options are supported: 'none' forces the model to not call a tool; the default when no tools are provided as part of the model config. 'auto' the model can decide to call one of the provided tools; the default when tools are provided as part of the model config. Providing {'name': <TOOL_NAME>} forces the model to use the provided tool of the same name.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.⚙️ Request BodyChatModelConfigRequest🔄 ReturnChatResponse🌐 Endpoint/chat-model-configpost🔙Back to Table of Contentshumanloop.completeCreate a completion by providing details of the model configuration in the request.🛠️ Usagecreate_response=humanloop.complete(model_config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete","prompt_template":"{{question}}",},project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,logprobs=1,suffix="string_example",)⚙️ Parametersmodel_config:ModelConfigCompletionRequestThe model configuration used to generate.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.logprobs:intInclude the log probabilities of the top n tokens in the provider_responsesuffix:strThe suffix that comes after a completion of inserted text. Useful for completions that act like inserts.⚙️ Request BodyCompletionRequest🔄 ReturnCompletionResponse🌐 Endpoint/completionpost🔙Back to Table of Contentshumanloop.complete_deployedCreate a completion using the project's active deployment.  The active deployment can be a specific model configuration or an experiment.🛠️ Usagecreate_deployed_response=humanloop.complete_deployed(project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,logprobs=1,suffix="string_example",environment="string_example",)⚙️ Parametersproject:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.logprobs:intInclude the log probabilities of the top n tokens in the provider_responsesuffix:strThe suffix that comes after a completion of inserted text. Useful for completions that act like inserts.environment:strThe environment name used to create a chat response. If not specified, the default environment will be used.⚙️ Request BodyCompletionDeployedRequest🔄 ReturnCompletionResponse🌐 Endpoint/completion-deployedpost🔙Back to Table of Contentshumanloop.complete_experimentCreate a completion for a specific experiment.🛠️ Usagecreate_experiment_response=humanloop.complete_experiment(experiment_id="string_example",project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,logprobs=1,suffix="string_example",)⚙️ Parametersexperiment_id:strIf an experiment ID is provided a model configuration will be sampled from the experiments active model configurations.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of chat responses, where each chat response will use a model configuration sampled from the experiment.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.logprobs:intInclude the log probabilities of the top n tokens in the provider_responsesuffix:strThe suffix that comes after a completion of inserted text. Useful for completions that act like inserts.⚙️ Request BodyCompletionExperimentRequest🔄 ReturnCompletionResponse🌐 Endpoint/completion-experimentpost🔙Back to Table of Contentshumanloop.complete_model_configurationCreate a completion for a specific model configuration.🛠️ Usagecreate_model_config_response=humanloop.complete_model_configuration(model_config_id="string_example",project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",provider_api_keys={},num_samples=1,stream=False,user="string_example",seed=1,return_inputs=True,logprobs=1,suffix="string_example",)⚙️ Parametersmodel_config_id:strIdentifies the model configuration used to create a chat response.project:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.num_samples:intThe number of generations.stream:boolIf true, tokens will be sent as data-only server-sent events. If num_samples > 1, samples are streamed back independently.user:strEnd-user ID passed through to provider call.seed:intDeprecated field: the seed is instead set as part of the request.config object.return_inputs:boolWhether to return the inputs in the response. If false, the response will contain an empty dictionary under inputs. This is useful for reducing the size of the response. Defaults to true.logprobs:intInclude the log probabilities of the top n tokens in the provider_responsesuffix:strThe suffix that comes after a completion of inserted text. Useful for completions that act like inserts.⚙️ Request BodyCompletionModelConfigRequest🔄 ReturnCompletionResponse🌐 Endpoint/completion-model-configpost🔙Back to Table of Contentshumanloop.datapoints.deleteDelete a list of datapoints by their IDs.🛠️ Usagehumanloop.datapoints.delete(body=["datapoints_delete_request_example"],)⚙️ Request BodyDatapointsDeleteRequest🌐 Endpoint/datapointsdelete🔙Back to Table of Contentshumanloop.datapoints.getGet a datapoint by ID.🛠️ Usageget_response=humanloop.datapoints.get(id="id_example",)⚙️ Parametersid:strString ID of datapoint. Starts withevtc_.🔄 ReturnDatapointResponse🌐 Endpoint/datapoints/{id}get🔙Back to Table of Contentshumanloop.datapoints.updateEdit the input, messages and criteria fields of a datapoint. The fields passed in the request are the ones edited.  Passingnullas a value for a field will delete that field. In order to signify not changing a field, it should be omitted from the request body.🛠️ Usageupdate_response=humanloop.datapoints.update(id="id_example",inputs={"key":"string_example",},messages=[{"role":"user",}],target={"key":"string_example",},)⚙️ Parametersid:strString ID of datapoint. Starts withevtc_.inputs:UpdateDatapointRequestInputsmessages: List[ChatMessageWithToolCall]The chat messages for this datapoint.target:UpdateDatapointRequestTarget⚙️ Request BodyUpdateDatapointRequest🔄 ReturnDatapointResponse🌐 Endpoint/datapoints/{id}patch🔙Back to Table of Contentshumanloop.datasets.createCreate a new dataset for a project.🛠️ Usagecreate_response=humanloop.datasets.create(description="string_example",name="string_example",project_id="project_id_example",)⚙️ Parametersdescription:strThe description of the dataset.name:strThe name of the dataset.project_id:str⚙️ Request BodyCreateDatasetRequest🔄 ReturnDatasetResponse🌐 Endpoint/projects/{project_id}/datasetspost🔙Back to Table of Contentshumanloop.datasets.create_datapointCreate a new testcase for a testset.🛠️ Usagecreate_datapoint_response=humanloop.datasets.create_datapoint(body={"log_ids":["log_ids_example"],},dataset_id="dataset_id_example",log_ids=["string_example"],inputs={"key":"string_example",},messages=[{"role":"user",}],target={"key":"string_example",},)⚙️ Parametersdataset_id:strString ID of dataset. Starts withevts_.requestBody:DatasetsCreateDatapointRequest🔄 ReturnDatasetsCreateDatapointResponse🌐 Endpoint/datasets/{dataset_id}/datapointspost🔙Back to Table of Contentshumanloop.datasets.deleteDelete a dataset by ID.🛠️ Usagedelete_response=humanloop.datasets.delete(id="id_example",)⚙️ Parametersid:strString ID of dataset. Starts withevts_.🔄 ReturnDatasetResponse🌐 Endpoint/datasets/{id}delete🔙Back to Table of Contentshumanloop.datasets.getGet a single dataset by ID.🛠️ Usageget_response=humanloop.datasets.get(id="id_example",)⚙️ Parametersid:strString ID of dataset. Starts withevts_.🔄 ReturnDatasetResponse🌐 Endpoint/datasets/{id}get🔙Back to Table of Contentshumanloop.datasets.list_all_for_projectGet all datasets for a project.🛠️ Usagelist_all_for_project_response=humanloop.datasets.list_all_for_project(project_id="project_id_example",)⚙️ Parametersproject_id:str🔄 ReturnDatasetsListAllForProjectResponse🌐 Endpoint/projects/{project_id}/datasetsget🔙Back to Table of Contentshumanloop.datasets.list_datapointsGet datapoints for a dataset.🛠️ Usagelist_datapoints_response=humanloop.datasets.list_datapoints(dataset_id="dataset_id_example",page=0,size=50,)⚙️ Parametersdataset_id:strString ID of dataset. Starts withevts_.page:intsize:int🔄 ReturnPaginatedDataDatapointResponse🌐 Endpoint/datasets/{dataset_id}/datapointsget🔙Back to Table of Contentshumanloop.datasets.updateUpdate a testset by ID.🛠️ Usageupdate_response=humanloop.datasets.update(id="id_example",description="string_example",name="string_example",)⚙️ Parametersid:strString ID of testset. Starts withevts_.description:strThe description of the dataset.name:strThe name of the dataset.⚙️ Request BodyUpdateDatasetRequest🔄 ReturnDatasetResponse🌐 Endpoint/datasets/{id}patch🔙Back to Table of Contentshumanloop.evaluations.add_evaluatorsAdd evaluators to an existing evaluation run.🛠️ Usageadd_evaluators_response=humanloop.evaluations.add_evaluators(evaluator_ids=["string_example"],id="id_example",)⚙️ Parametersevaluator_ids:AddEvaluatorsRequestEvaluatorIdsid:strString ID of evaluation run. Starts withev_.⚙️ Request BodyAddEvaluatorsRequest🔄 ReturnEvaluationResponse🌐 Endpoint/evaluations/{id}/evaluatorspatch🔙Back to Table of Contentshumanloop.evaluations.createCreate an evaluation.🛠️ Usagecreate_response=humanloop.evaluations.create(config_id="string_example",evaluator_ids=["string_example"],dataset_id="string_example",project_id="project_id_example",provider_api_keys={},max_concurrency=5,hl_generated=True,)⚙️ Parametersconfig_id:strID of the config to evaluate. Starts withconfig_.evaluator_ids:CreateEvaluationRequestEvaluatorIdsdataset_id:strID of the dataset to use in this evaluation. Starts withevts_.project_id:strString ID of project. Starts withpr_.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization. Ensure you provide an API key for the provider for the model config you are evaluating, or have one saved to your organization.max_concurrency:intThe maximum number of concurrent generations to run. A higher value will result in faster completion of the evaluation but may place higher load on your provider rate-limits.hl_generated:boolWhether the log generations for this evaluation should be performed by Humanloop. IfFalse, the log generations should be submitted by the user via the API.⚙️ Request BodyCreateEvaluationRequest🔄 ReturnEvaluationResponse🌐 Endpoint/projects/{project_id}/evaluationspost🔙Back to Table of Contentshumanloop.evaluations.getGet evaluation by ID.🛠️ Usageget_response=humanloop.evaluations.get(id="id_example",evaluator_aggregates=True,)⚙️ Parametersid:strString ID of evaluation run. Starts withev_.evaluator_aggregates:boolWhether to include evaluator aggregates in the response.🔄 ReturnEvaluationResponse🌐 Endpoint/evaluations/{id}get🔙Back to Table of Contentshumanloop.evaluations.listGet the evaluations associated with a project.  Sorting and filtering are supported through query params for categorical columns and thecreated_attimestamp.  Sorting is supported for thedataset,config,statusandevaluator-{evaluator_id}columns. Specify sorting with thesortquery param, with values{column}.{ordering}. E.g. ?sort=dataset.asc&sort=status.desc will yield a multi-column sort. First by dataset then by status.  Filtering is supported for theid,dataset,configandstatuscolumns.  Specify filtering with theid_filter,dataset_filter,config_filterandstatus_filterquery params.  E.g. ?dataset_filter=my_dataset&dataset_filter=my_other_dataset&status_filter=running will only show rows where the dataset is "my_dataset" or "my_other_dataset", and where the status is "running".  An additional date range filter is supported for thecreated_atcolumn. Use thestart_dateandend_datequery parameters to configure this.🛠️ Usagelist_response=humanloop.evaluations.list(project_id="project_id_example",id=["string_example"],start_date="1970-01-01",end_date="1970-01-01",size=50,page=0,)⚙️ Parametersproject_id:strString ID of project. Starts withpr_.id: List[str]A list of evaluation run ids to filter on. Starts withev_.start_date:dateOnly return evaluations created after this date.end_date:dateOnly return evaluations created before this date.size:intpage:int🔄 ReturnPaginatedDataEvaluationResponse🌐 Endpoint/evaluationsget🔙Back to Table of Contentshumanloop.evaluations.list_all_for_projectGet all the evaluations associated with your project.  Deprecated: This is a legacy unpaginated endpoint. Use/evaluationsinstead, with appropriate sorting, filtering and pagination options.🛠️ Usagelist_all_for_project_response=humanloop.evaluations.list_all_for_project(project_id="project_id_example",evaluator_aggregates=True,)⚙️ Parametersproject_id:strString ID of project. Starts withpr_.evaluator_aggregates:boolWhether to include evaluator aggregates in the response.🔄 ReturnEvaluationsGetForProjectResponse🌐 Endpoint/projects/{project_id}/evaluationsget🔙Back to Table of Contentshumanloop.evaluations.list_datapointsGet testcases by evaluation ID.🛠️ Usagelist_datapoints_response=humanloop.evaluations.list_datapoints(id="id_example",page=1,size=10,)⚙️ Parametersid:strString ID of evaluation. Starts withev_.page:intPage to fetch. Starts from 1.size:intNumber of evaluation results to retrieve.🔄 ReturnPaginatedDataEvaluationDatapointSnapshotResponse🌐 Endpoint/evaluations/{id}/datapointsget🔙Back to Table of Contentshumanloop.evaluations.logLog an external generation to an evaluation run for a datapoint.  The run must have status 'running'.🛠️ Usagelog_response=humanloop.evaluations.log(datapoint_id="string_example",log={"save":True,},evaluation_id="evaluation_id_example",)⚙️ Parametersdatapoint_id:strThe datapoint for which a log was generated. Must be one of the datapoints in the dataset being evaluated.log:LogRequestThe log generated for the datapoint.evaluation_id:strID of the evaluation run. Starts withevrun_.⚙️ Request BodyCreateEvaluationLogRequest🔄 ReturnCreateLogResponse🌐 Endpoint/evaluations/{evaluation_id}/logpost🔙Back to Table of Contentshumanloop.evaluations.resultLog an evaluation result to an evaluation run.  The run must have status 'running'. One ofresultorerrormust be provided.🛠️ Usageresult_response=humanloop.evaluations.result(log_id="string_example",evaluator_id="string_example",evaluation_id="evaluation_id_example",result=True,error="string_example",)⚙️ Parameterslog_id:strThe log that was evaluated. Must have as itssource_datapoint_idone of the datapoints in the dataset being evaluated.evaluator_id:strID of the evaluator that evaluated the log. Starts withevfn_. Must be one of the evaluator IDs associated with the evaluation run being logged to.evaluation_id:strID of the evaluation run. Starts withevrun_.result: Union[bool,int,Union[int, float]]The result value of the evaluation.error:strAn error that occurred during evaluation.⚙️ Request BodyCreateEvaluationResultLogRequest🔄 ReturnEvaluationResultResponse🌐 Endpoint/evaluations/{evaluation_id}/resultpost🔙Back to Table of Contentshumanloop.evaluations.update_statusUpdate the status of an evaluation run.  Can only be used to update the status of an evaluation run that uses external or human evaluators. The evaluation must currently have status 'running' if swithcing to completed, or it must have status 'completed' if switching back to 'running'.🛠️ Usageupdate_status_response=humanloop.evaluations.update_status(status="pending",id="id_example",)⚙️ Parametersstatus:EvaluationStatusThe new status of the evaluation.id:strString ID of evaluation run. Starts withev_.⚙️ Request BodyUpdateEvaluationStatusRequest🔄 ReturnEvaluationResponse🌐 Endpoint/evaluations/{id}/statuspatch🔙Back to Table of Contentshumanloop.evaluators.createCreate an evaluator within your organization.🛠️ Usagecreate_response=humanloop.evaluators.create(description="string_example",name="a",arguments_type="target_free",return_type="boolean",type="python",code="string_example",model_config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete","prompt_template":"{{question}}",},)⚙️ Parametersdescription:strThe description of the evaluator.name:strThe name of the evaluator.arguments_type:EvaluatorArgumentsTypeWhether this evaluator is target-free or target-required.return_type:EvaluatorReturnTypeEnumThe type of the return value of the evaluator.type:EvaluatorTypeThe type of the evaluator.code:strThe code for the evaluator. This code will be executed in a sandboxed environment.model_config:ModelConfigCompletionRequestThe model configuration used to generate.⚙️ Request BodyCreateEvaluatorRequest🔄 ReturnEvaluatorResponse🌐 Endpoint/evaluatorspost🔙Back to Table of Contentshumanloop.evaluators.deleteDelete an evaluator within your organization.🛠️ Usagehumanloop.evaluators.delete(id="id_example",)⚙️ Parametersid:str🌐 Endpoint/evaluators/{id}delete🔙Back to Table of Contentshumanloop.evaluators.getGet an evaluator within your organization.🛠️ Usageget_response=humanloop.evaluators.get(id="id_example",)⚙️ Parametersid:str🔄 ReturnEvaluatorResponse🌐 Endpoint/evaluators/{id}get🔙Back to Table of Contentshumanloop.evaluators.listGet all evaluators within your organization.🛠️ Usagelist_response=humanloop.evaluators.list()🔄 ReturnEvaluatorsListResponse🌐 Endpoint/evaluatorsget🔙Back to Table of Contentshumanloop.evaluators.updateUpdate an evaluator within your organization.🛠️ Usageupdate_response=humanloop.evaluators.update(id="id_example",description="string_example",name="string_example",arguments_type="target_free",return_type="boolean",code="string_example",model_config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete","prompt_template":"{{question}}",},)⚙️ Parametersid:strdescription:strThe description of the evaluator.name:strThe name of the evaluator.arguments_type:EvaluatorArgumentsTypeWhether this evaluator is target-free or target-required.return_type:EvaluatorReturnTypeEnumThe type of the return value of the evaluator.code:strThe code for the evaluator. This code will be executed in a sandboxed environment.model_config:ModelConfigCompletionRequestThe model configuration used to generate.⚙️ Request BodyUpdateEvaluatorRequest🔄 ReturnEvaluatorResponse🌐 Endpoint/evaluators/{id}patch🔙Back to Table of Contentshumanloop.experiments.createCreate an experiment for your project.  You can optionally specify IDs of your project's model configs to include in the experiment, along with a set of labels to consider as positive feedback and whether the experiment should be set as active.🛠️ Usagecreate_response=humanloop.experiments.create(name="string_example",positive_labels=[{"type":"type_example","value":"value_example",}],project_id="project_id_example",config_ids=["string_example"],set_active=False,)⚙️ Parametersname:strName of experiment.positive_labels: List[PositiveLabel]Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment.project_id:strString ID of project. Starts withpr_.config_ids:CreateExperimentRequestConfigIdsset_active:boolWhether to set the created project as the project's active experiment.⚙️ Request BodyCreateExperimentRequest🔄 ReturnExperimentResponse🌐 Endpoint/projects/{project_id}/experimentspost🔙Back to Table of Contentshumanloop.experiments.deleteDelete the experiment with the specified ID.🛠️ Usagehumanloop.experiments.delete(experiment_id="experiment_id_example",)⚙️ Parametersexperiment_id:strString ID of experiment. Starts withexp_.🌐 Endpoint/experiments/{experiment_id}delete🔙Back to Table of Contentshumanloop.experiments.listGet an array of experiments associated to your project.🛠️ Usagelist_response=humanloop.experiments.list(project_id="project_id_example",)⚙️ Parametersproject_id:strString ID of project. Starts withpr_.🔄 ReturnExperimentsListResponse🌐 Endpoint/projects/{project_id}/experimentsget🔙Back to Table of Contentshumanloop.experiments.sampleSamples a model config from the experiment's active model configs.🛠️ Usagesample_response=humanloop.experiments.sample(experiment_id="experiment_id_example",)⚙️ Parametersexperiment_id:strString ID of experiment. Starts withexp_.🔄 ReturnGetModelConfigResponse🌐 Endpoint/experiments/{experiment_id}/model-configget🔙Back to Table of Contentshumanloop.experiments.updateUpdate your experiment, including registering and de-registering model configs.🛠️ Usageupdate_response=humanloop.experiments.update(experiment_id="experiment_id_example",name="string_example",positive_labels=[{"type":"type_example","value":"value_example",}],config_ids_to_register=["string_example"],config_ids_to_deregister=["string_example"],)⚙️ Parametersexperiment_id:strString ID of experiment. Starts withexp_.name:strName of experiment.positive_labels: List[PositiveLabel]Feedback labels to treat as positive user feedback. Used to monitor the performance of model configs in the experiment.config_ids_to_register:UpdateExperimentRequestConfigIdsToRegisterconfig_ids_to_deregister:UpdateExperimentRequestConfigIdsToDeregister⚙️ Request BodyUpdateExperimentRequest🔄 ReturnExperimentResponse🌐 Endpoint/experiments/{experiment_id}patch🔙Back to Table of Contentshumanloop.feedbackSubmit an array of feedback for existingdata_ids🛠️ Usagefeedback_response=humanloop.feedback(body=[{"type":"string_example",}],type="string_example",value="string_example",data_id="string_example",user="string_example",created_at="1970-01-01T00:00:00.00Z",unset=True,)⚙️ Parameterstype: Union[FeedbackType,str]The type of feedback. The default feedback types available are 'rating', 'action', 'issue', 'correction', and 'comment'.value:strThe feedback value to be set. This field should be left blank when unsetting 'rating', 'correction' or 'comment', but is required otherwise.data_id:strID to associate the feedback to a previously logged datapoint.user:strA unique identifier to who provided the feedback.created_at:datetimeUser defined timestamp for when the feedback was created.unset:boolIf true, the value for this feedback is unset.⚙️ Request BodyFeedbackSubmitRequest🔄 ReturnFeedbackSubmitResponse🌐 Endpoint/feedbackpost🔙Back to Table of Contentshumanloop.finetunes.createTrigger the fine-tuning process for a specific base model and data snapshot.🛠️ Usagecreate_response=humanloop.finetunes.create(name="string_example",dataset_id="string_example",config={"provider":"openai","base_model":"base_model_example",},project_id="project_id_example",metadata={},provider_api_keys={},)⚙️ Parametersname:strUser defined friendly name for a finetuning rundataset_id:strID of dataset used for finetuningconfig:FinetuneConfigConfiguration and hyper-parameters for the fine-tuning processproject_id:strmetadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata that you would like to log for reference.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.⚙️ Request BodyFinetuneRequest🔄 ReturnFinetuneResponse🌐 Endpoint/projects/{project_id}/finetunespost🔙Back to Table of Contentshumanloop.finetunes.list_all_for_projectGet a list of all fine-tuned models associated to a given project.🛠️ Usagelist_all_for_project_response=humanloop.finetunes.list_all_for_project(project_id="project_id_example",)⚙️ Parametersproject_id:str🔄 ReturnFinetunesListAllForProjectResponse🌐 Endpoint/projects/{project_id}/finetunesget🔙Back to Table of Contentshumanloop.finetunes.summaryChecks data for errors and generates finetune data summary.  Does not actually trigger the finetuning process or persist the data.🛠️ Usagesummary_response=humanloop.finetunes.summary(name="string_example",dataset_id="string_example",config={"provider":"openai","base_model":"base_model_example",},project_id="project_id_example",metadata={},provider_api_keys={},)⚙️ Parametersname:strUser defined friendly name for a finetuning rundataset_id:strID of dataset used for finetuningconfig:FinetuneConfigConfiguration and hyper-parameters for the fine-tuning processproject_id:strmetadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata that you would like to log for reference.provider_api_keys:ProviderApiKeysAPI keys required by each provider to make API calls. The API keys provided here are not stored by Humanloop. If not specified here, Humanloop will fall back to the key saved to your organization.⚙️ Request BodyFinetuneRequest🔄 ReturnFinetuneDataSummary🌐 Endpoint/projects/{project_id}/finetunes/summarypost🔙Back to Table of Contentshumanloop.finetunes.updateUpdate user-specified attributes of the specified finetuned models.🛠️ Usageupdate_response=humanloop.finetunes.update(id="id_example",project_id="project_id_example",name="string_example",)⚙️ Parametersid:strproject_id:strname:str⚙️ Request BodyUpdateFinetuneRequest🔄 ReturnFinetuneResponse🌐 Endpoint/finetunes/{id}patch🔙Back to Table of Contentshumanloop.logs.deleteDelete🛠️ Usagehumanloop.logs.delete(id=["string_example"],)⚙️ Parametersid: List[str]🌐 Endpoint/logsdelete🔙Back to Table of Contentshumanloop.logs.getRetrieve a log by log id.🛠️ Usageget_response=humanloop.logs.get(id="id_example",)⚙️ Parametersid:strString ID of log to return. Starts withdata_.🔄 ReturnLogResponse🌐 Endpoint/logs/{id}get🔙Back to Table of Contentshumanloop.logs.listRetrieve paginated logs from the server.  Sorting and filtering are supported through query params.  Sorting is supported for thesource,model,timestamp, andfeedback-{output_name}columns. Specify sorting with thesortquery param, with values{column}.{ordering}. E.g. ?sort=source.asc&sort=model.desc will yield a multi-column sort. First by source then by model.  Filtering is supported for thesource,model,feedback-{output_name},evaluator-{evaluator_external_id}columns.  Specify filtering with thesource_filter,model_filter,feedback-{output.name}_filterandevaluator-{evaluator_external_id}_filterquery params.  E.g. ?source_filter=AI&source_filter=user_1234&feedback-explicit_filter=good will only show rows where the source is "AI" or "user_1234", and where the latest feedback for the "explicit" output group is "good".  An additional date range filter is supported for theTimestampcolumn (i.e.Log.created_at). These are supported through thestart_dateandend_datequery parameters.  Searching is supported for the model inputs and output. Specify a search term with thesearchquery param. E.g. ?search=hello%20there will cause a case-insensitive search across model inputs and output.🛠️ Usagelist_response=humanloop.logs.list(project_id="project_id_example",search="string_example",metadata_search="string_example",start_date="1970-01-01",end_date="1970-01-01",size=50,page=0,)⚙️ Parametersproject_id:strsearch:strmetadata_search:strstart_date:dateend_date:datesize:intpage:int🔄 ReturnPaginatedDataLogResponse🌐 Endpoint/logsget🔙Back to Table of Contentshumanloop.logLog a datapoint or array of datapoints to your Humanloop project.🛠️ Usagelog_response=humanloop.log(body=[{"save":True,}],project="string_example",project_id="string_example",session_id="string_example",session_reference_id="string_example",parent_id="string_example",parent_reference_id="string_example",inputs={},source="string_example",metadata={},save=True,source_datapoint_id="string_example",reference_id="string_example",trial_id="string_example",messages=[{"role":"user",}],output="string_example",config_id="string_example",config={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete","type":"ModelConfigRequest",},environment="string_example",feedback={"type":"string_example","value":3.14,},created_at="1970-01-01T00:00:00.00Z",error="string_example",duration=3.14,output_message={"role":"user",},prompt_tokens=1,output_tokens=1,provider_request={},provider_response={},)⚙️ Parametersproject:strUnique project name. If no project exists with this name, a new project will be created.project_id:strUnique ID of a project to associate to the log. Either this orprojectmust be provided.session_id:strID of the session to associate the datapoint.session_reference_id:strA unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the samesession_reference_idin subsequent log requests. Specify at most one of this orsession_id.parent_id:strID associated to the parent datapoint in a session.parent_reference_id:strA unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a prior log request. Specify at most one of this orparent_id. Note that this cannot refer to a datapoint being logged in the same request.inputs:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]The inputs passed to the prompt template.source:strIdentifies where the model was called from.metadata:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Any additional metadata to record.save:boolWhether the request/response payloads will be stored on Humanloop.source_datapoint_id:strID of the source datapoint if this is a log derived from a datapoint in a dataset.reference_id:strA unique string to reference the datapoint. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID asparent_idin a subsequent log request.trial_id:strUnique ID of an experiment trial to associate to the log.messages: List[ChatMessageWithToolCall]The messages passed to the to provider chat endpoint.output:strGenerated output from your model for the provided inputs. Can beNoneif logging an error, or if logging a parent datapoint with the intention to populate it laterconfig_id:strUnique ID of a config to associate to the log.config: Union[ModelConfigRequest,ToolConfigRequest]The model config used for this generation. Required unlessconfig_idortrial_idis provided.environment:strThe environment name used to create the log.feedback: Union[Feedback, List[Feedback]]Optional parameter to provide feedback with your logged datapoint.created_at:datetimeUser defined timestamp for when the log was created.error:strError message if the log is an error.duration:Union[int, float]Duration of the logged event in seconds.output_message:ChatMessageWithToolCallThe message returned by the provider.prompt_tokens:intNumber of tokens in the prompt used to generate the output.output_tokens:intNumber of tokens in the output generated by the model.provider_request:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Raw request sent to provider.provider_response:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Raw response received the provider.⚙️ Request BodyLogDatapointRequest🔄 ReturnLogsLogResponse🌐 Endpoint/logspost🔙Back to Table of Contentshumanloop.logs.updateUpdate a logged datapoint in your Humanloop project.🛠️ Usageupdate_response=humanloop.logs.update(id="id_example",output="string_example",error="string_example",duration=3.14,)⚙️ Parametersid:strString ID of logged datapoint to return. Starts withdata_.output:strGenerated output from your model for the provided inputs.error:strError message if the log is an error.duration:Union[int, float]Duration of the logged event in seconds.⚙️ Request BodyUpdateLogRequest🔄 ReturnLogResponse🌐 Endpoint/logs/{id}patch🔙Back to Table of Contentshumanloop.logs.update_by_refUpdate a logged datapoint by its reference ID.  Thereference_idquery parameter must be provided, and refers to thereference_idof a previously-logged datapoint.🛠️ Usageupdate_by_ref_response=humanloop.logs.update_by_ref(reference_id="reference_id_example",output="string_example",error="string_example",duration=3.14,)⚙️ Parametersreference_id:strA unique string to reference the datapoint. Identifies the logged datapoint created with the samereference_id.output:strGenerated output from your model for the provided inputs.error:strError message if the log is an error.duration:Union[int, float]Duration of the logged event in seconds.⚙️ Request BodyUpdateLogRequest🔄 ReturnLogResponse🌐 Endpoint/logspatch🔙Back to Table of Contentshumanloop.model_configs.deserializeDeserialize a model config from a .prompt file format.🛠️ Usagedeserialize_response=humanloop.model_configs.deserialize(config="string_example",)⚙️ Parametersconfig:str⚙️ Request BodyBodyModelConfigsDeserialize🔄 ReturnModelConfigResponse🌐 Endpoint/model-configs/deserializepost🔙Back to Table of Contentshumanloop.model_configs.exportExport a model config to a .prompt file by ID.🛠️ Usageexport_response=humanloop.model_configs.export(id="id_example",)⚙️ Parametersid:strString ID of the model config. Starts withconfig_.🌐 Endpoint/model-configs/{id}/exportpost🔙Back to Table of Contentshumanloop.model_configs.getGet a specific model config by ID.🛠️ Usageget_response=humanloop.model_configs.get(id="id_example",)⚙️ Parametersid:strString ID of the model config. Starts withconfig_.🔄 ReturnModelConfigResponse🌐 Endpoint/model-configs/{id}get🔙Back to Table of Contentshumanloop.model_configs.registerRegister a model config to a project and optionally add it to an experiment.  If the project name provided does not exist, a new project will be created automatically.  If an experiment name is provided, the specified experiment must already exist. Otherwise, an error will be raised.  If the model config is the first to be associated to the project, it will be set as the active model config.🛠️ Usageregister_response=humanloop.model_configs.register(model="string_example",description="string_example",name="string_example",provider="openai",max_tokens=-1,temperature=1,top_p=1,stop="string_example",presence_penalty=0,frequency_penalty=0,other={},seed=1,response_format={"type":"json_object",},project="string_example",project_id="string_example",experiment="string_example",prompt_template="string_example",chat_template=[{"role":"user",}],endpoint="complete",tools=[{"id":"id_example","source":"organization",}],)⚙️ Parametersmodel:strThe model instance used. E.g. text-davinci-002.description:strA description of the model config.name:strA friendly display name for the model config. If not provided, a name will be generated.provider:ModelProvidersThe company providing the underlying model service.max_tokens:intThe maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompttemperature:Union[int, float]What sampling temperature to use when making a generation. Higher values means the model will be more creative.top_p:Union[int, float]An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.stop: Union[str,List[str]]The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.presence_penalty:Union[int, float]Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.frequency_penalty:Union[int, float]Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.other:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Other parameter values to be passed to the provider call.seed:intIf specified, model will make a best effort to sample deterministically, but it is not guaranteed.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.project:strUnique project name. If it does not exist, a new project will be created.project_id:strUnique project IDexperiment:strIf specified, the model config will be added to this experiment. Experiments are used for A/B testing and optimizing hyperparameters.prompt_template:strPrompt template that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}.chat_template: List[ChatMessageWithToolCall]Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. NB: Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}.endpoint:ModelEndpointsWhich of the providers model endpoints to use. For example Complete or Edit.tools:ProjectModelConfigRequestTools⚙️ Request BodyProjectModelConfigRequest🔄 ReturnProjectConfigResponse🌐 Endpoint/model-configspost🔙Back to Table of Contentshumanloop.model_configs.serializeSerialize a model config to a .prompt file format.🛠️ Usageserialize_response=humanloop.model_configs.serialize(body={"provider":"openai","model":"model_example","max_tokens":-1,"temperature":1,"top_p":1,"presence_penalty":0,"frequency_penalty":0,"endpoint":"complete",},description="string_example",name="string_example",provider="openai",model="string_example",max_tokens=-1,temperature=1,top_p=1,stop="string_example",presence_penalty=0,frequency_penalty=0,other={},seed=1,response_format={"type":"json_object",},endpoint="complete",chat_template=[{"role":"user",}],tools=[{"id":"id_example","source":"organization",}],prompt_template="{{question}}",)⚙️ Parametersdescription:strA description of the model config.name:strA friendly display name for the model config. If not provided, a name will be generated.provider:ModelProvidersThe company providing the underlying model service.model:strThe model instance used. E.g. text-davinci-002.max_tokens:intThe maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompttemperature:Union[int, float]What sampling temperature to use when making a generation. Higher values means the model will be more creative.top_p:Union[int, float]An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.stop: Union[str,List[str]]The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.presence_penalty:Union[int, float]Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.frequency_penalty:Union[int, float]Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.other:Dict[str, Union[bool, date, datetime, dict, float, int, list, str, None]]Other parameter values to be passed to the provider call.seed:intIf specified, model will make a best effort to sample deterministically, but it is not guaranteed.response_format:ResponseFormatThe format of the response. Only type json_object is currently supported for chat.endpoint:ModelEndpointsThe provider model endpoint used.chat_template: List[ChatMessageWithToolCall]Messages prepended to the list of messages sent to the provider. These messages that will take your specified inputs to form your final request to the provider model. Input variables within the template should be specified with syntax: {{INPUT_NAME}}.tools:ModelConfigChatRequestToolsprompt_template:strPrompt template that will take your specified inputs to form your final request to the model. Input variables within the prompt template should be specified with syntax: {{INPUT_NAME}}.⚙️ Request BodyModelConfigsSerializeRequest🌐 Endpoint/model-configs/serializepost🔙Back to Table of Contentshumanloop.projects.createCreate a new project.🛠️ Usagecreate_response=humanloop.projects.create(name="string_example",feedback_types=[{"type":"type_example","_class":"select",}],directory_id="string_example",)⚙️ Parametersname:strUnique project name.feedback_types: List[FeedbackTypeRequest]Feedback types to be created.directory_id:strID of directory to assign project to. Starts withdir_. If not provided, the project will be created in the root directory.⚙️ Request BodyCreateProjectRequest🔄 ReturnProjectResponse🌐 Endpoint/projectspost🔙Back to Table of Contentshumanloop.projects.create_feedback_typeCreate Feedback Type🛠️ Usagecreate_feedback_type_response=humanloop.projects.create_feedback_type(type="string_example",id="id_example",values=[{"value":"value_example","sentiment":"positive",}],_class="select",)⚙️ Parameterstype:strThe type of feedback to update.id:strString ID of project. Starts withpr_.values: List[FeedbackLabelRequest]The feedback values to be available. This field should only be populated when updating a 'select' or 'multi_select' feedback class._class:FeedbackClassThe data type associated to this feedback type; whether it is a 'text'/'select'/'multi_select'. This is optional when updating the default feedback types (i.e. whentypeis 'rating', 'action' or 'issue').⚙️ Request BodyFeedbackTypeRequest🔄 ReturnFeedbackTypeModel🌐 Endpoint/projects/{id}/feedback-typespost🔙Back to Table of Contentshumanloop.projects.deactivate_configRemove the project's active config, if set.  This has no effect if the project does not have an active model config set.🛠️ Usagedeactivate_config_response=humanloop.projects.deactivate_config(id="id_example",environment="string_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.environment:strName for the environment. E.g. 'production'. If not provided, will delete the active config for the default environment.🔄 ReturnProjectResponse🌐 Endpoint/projects/{id}/active-configdelete🔙Back to Table of Contentshumanloop.projects.deactivate_experimentRemove the project's active experiment, if set.  This has no effect if the project does not have an active experiment set.🛠️ Usagedeactivate_experiment_response=humanloop.projects.deactivate_experiment(id="id_example",environment="string_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.environment:strName for the environment. E.g. 'producton'. If not provided, will return the experiment for the default environment.🔄 ReturnProjectResponse🌐 Endpoint/projects/{id}/active-experimentdelete🔙Back to Table of Contentshumanloop.projects.deleteDelete a specific file.🛠️ Usagehumanloop.projects.delete(id="id_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.🌐 Endpoint/projects/{id}delete🔙Back to Table of Contentshumanloop.projects.delete_deployed_configRemove the verion deployed to environment.  This has no effect if the project does not have an active version set.🛠️ Usagedelete_deployed_config_response=humanloop.projects.delete_deployed_config(project_id="project_id_example",environment_id="environment_id_example",)⚙️ Parametersproject_id:strenvironment_id:str🌐 Endpoint/projects/{project_id}/deployed-config/{environment_id}delete🔙Back to Table of Contentshumanloop.projects.deploy_configDeploy a model config to an environment.  If the environment already has a model config deployed, it will be replaced.🛠️ Usagedeploy_config_response=humanloop.projects.deploy_config(project_id="project_id_example",config_id="string_example",experiment_id="string_example",environments=[{"id":"id_example",}],)⚙️ Parametersproject_id:strconfig_id:strModel config unique identifier generated by Humanloop.experiment_id:strString ID of experiment. Starts withexp_.environments: List[EnvironmentRequest]List of environments to associate with the model config.⚙️ Request BodyEnvironmentProjectConfigRequest🔄 ReturnProjectsDeployConfigToEnvironmentsResponse🌐 Endpoint/projects/{project_id}/deploy-configpatch🔙Back to Table of Contentshumanloop.projects.exportExport all logged datapoints associated to your project.  Results are paginated and sorts the datapoints based oncreated_atin descending order.🛠️ Usageexport_response=humanloop.projects.export(id="id_example",page=0,size=10,)⚙️ Parametersid:strString ID of project. Starts withpr_.page:intPage offset for pagination.size:intPage size for pagination. Number of logs to export.🔄 ReturnPaginatedDataLogResponse🌐 Endpoint/projects/{id}/exportpost🔙Back to Table of Contentshumanloop.projects.getGet a specific project.🛠️ Usageget_response=humanloop.projects.get(id="id_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.🔄 ReturnProjectResponse🌐 Endpoint/projects/{id}get🔙Back to Table of Contentshumanloop.projects.get_active_configRetrieves a config to use to execute your model.  A config will be selected based on the project's active config/experiment settings.🛠️ Usageget_active_config_response=humanloop.projects.get_active_config(id="id_example",environment="string_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.environment:strName for the environment. E.g. 'producton'. If not provided, will return the active config for the default environment.🔄 ReturnGetModelConfigResponse🌐 Endpoint/projects/{id}/active-configget🔙Back to Table of Contentshumanloop.projects.listGet a paginated list of files.🛠️ Usagelist_response=humanloop.projects.list(page=0,size=10,filter="string_example",user_filter="string_example",sort_by="created_at",order="asc",)⚙️ Parameterspage:intPage offset for pagination.size:intPage size for pagination. Number of projects to fetch.filter:strCase-insensitive filter for project name.user_filter:strCase-insensitive filter for users in the project. This filter matches against both email address and name of users.sort_by:ProjectSortByField to sort projects byorder:SortOrderDirection to sort by.🔄 ReturnPaginatedDataProjectResponse🌐 Endpoint/projectsget🔙Back to Table of Contentshumanloop.projects.list_configsGet an array of versions associated to your file.🛠️ Usagelist_configs_response=humanloop.projects.list_configs(id="id_example",evaluation_aggregates=True,)⚙️ Parametersid:strString ID of project. Starts withpr_.evaluation_aggregates:bool🔄 ReturnProjectsGetConfigsResponse🌐 Endpoint/projects/{id}/configsget🔙Back to Table of Contentshumanloop.projects.list_deployed_configsGet an array of environments with the deployed configs associated to your project.🛠️ Usagelist_deployed_configs_response=humanloop.projects.list_deployed_configs(id="id_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.🔄 ReturnProjectsGetDeployedConfigsResponse🌐 Endpoint/projects/{id}/deployed-configsget🔙Back to Table of Contentshumanloop.projects.updateUpdate a specific project.  Set the project's active model config/experiment by passing eitheractive_experiment_idoractive_model_config_id. These will be set to the Default environment unless a list of environments are also passed in specifically detailing which environments to assign the active config or experiment.  Set the feedback labels to be treated as positive user feedback used in calculating top-level project metrics by passing a list of labels inpositive_labels.🛠️ Usageupdate_response=humanloop.projects.update(id="id_example",name="string_example",active_experiment_id="string_example",active_config_id="string_example",positive_labels=[{"type":"type_example","value":"value_example",}],directory_id="string_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.name:strThe new unique project name. Caution, if you are using the project name as the unique identifier in your API calls, changing the name will break the calls.active_experiment_id:strID for an experiment to set as the project's active deployment. Starts with 'exp_'. At most one of 'active_experiment_id' and 'active_model_config_id' can be set.active_config_id:strID for a config to set as the project's active deployment. Starts with 'config_'. At most one of 'active_experiment_id' and 'active_config_id' can be set.positive_labels: List[PositiveLabel]The full list of labels to treat as positive user feedback.directory_id:strID of directory to assign project to. Starts withdir_.⚙️ Request BodyUpdateProjectRequest🔄 ReturnProjectResponse🌐 Endpoint/projects/{id}patch🔙Back to Table of Contentshumanloop.projects.update_feedback_typesUpdate feedback types.  Allows enabling the available feedback types and setting status of feedback types/categorical values.  This behaves like an upsert; any feedback categorical values that do not already exist in the project will be created.🛠️ Usageupdate_feedback_types_response=humanloop.projects.update_feedback_types(body=[{"type":"type_example","_class":"select",}],id="id_example",)⚙️ Parametersid:strString ID of project. Starts withpr_.requestBody:ProjectsUpdateFeedbackTypesRequest🔄 ReturnFeedbackTypes🌐 Endpoint/projects/{id}/feedback-typespatch🔙Back to Table of Contentshumanloop.sessions.createCreate a new session.  Returns a session ID that can be used to log datapoints to the session.🛠️ Usagecreate_response=humanloop.sessions.create()🔄 ReturnCreateSessionResponse🌐 Endpoint/sessionspost🔙Back to Table of Contentshumanloop.sessions.getGet a session by ID.🛠️ Usageget_response=humanloop.sessions.get(id="id_example",)⚙️ Parametersid:strString ID of session to return. Starts withsesh_.🔄 ReturnSessionResponse🌐 Endpoint/sessions/{id}get🔙Back to Table of Contentshumanloop.sessions.listGet a page of sessions.🛠️ Usagelist_response=humanloop.sessions.list(project_id="project_id_example",page=1,size=10,)⚙️ Parametersproject_id:strString ID of project to return sessions for. Sessions that contain any datapoints associated to this project will be returned. Starts withpr_.page:intPage to fetch. Starts from 1.size:intNumber of sessions to retrieve.🔄 ReturnPaginatedDataSessionResponse🌐 Endpoint/sessionsget🔙Back to Table of ContentsAuthorThis Python package is automatically generated byKonfig