Python
from openlayer import Openlayer
client = Openlayer()
response = client.inference_pipelines.rows.update(
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
inference_id="0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
row={"ground_truth": "The sun is about 93 million miles from the earth."},
config={"ground_truth_column_name": "ground_truth"},
)
print(response.success)
import Openlayer from 'openlayer';
const client = new Openlayer();
const response = await client.inferencePipelines.rows.update('c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f', {
inferenceId: '0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f',
row: { human_feedback: 'thumbs_up' },
config: { humanFeedbackColumnName: 'human_feedback' },
});
console.log(response.success);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
response, err := client.InferencePipelines.Rows.Update(
context.TODO(),
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
openlayer.InferencePipelineRowUpdateParams{
InferenceID: openlayer.F("0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f"),
Row: openlayer.F[any](map[string]interface{}{
"ground_truth": "42",
}),
Config: openlayer.F(openlayer.InferencePipelineRowUpdateParamsConfig{
GroundTruthColumnName: openlayer.F("ground_truth"),
}),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Success)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.core.JsonValue;
import com.openlayer.api.models.inferencepipelines.rows.RowUpdateParams;
import com.openlayer.api.models.inferencepipelines.rows.RowUpdateResponse;
import java.util.Map;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
RowUpdateParams params = RowUpdateParams.builder()
.inferencePipelineId("c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f")
.inferenceId("0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f")
.row(JsonValue.from(Map.of("human_feedback", "thumbs_up")))
.config(RowUpdateParams.Config.builder()
.humanFeedbackColumnName("human_feedback")
.build())
.build();
RowUpdateResponse response = client.inferencePipelines().rows().update(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
response = openlayer.inference_pipelines.rows.update(
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
inference_id: "0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
row: {human_feedback: "thumbs_up"},
config: {human_feedback_column_name: "human_feedback"}
)
puts(response)
curl --request PUT \
--url https://api.openlayer.com/v1/inference-pipelines/{inferencePipelineId}/rows?inferenceId=832y98d3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"row": {
"ground_truth": "The sun is 94.471 million miles from the earth."
},
"config": {
"groundTruthColumnName": "ground_truth",
}
}'
{
"success": true
}{
"code": 123,
"error": "<string>"
}Monitoring
Update record
Update a record in a data source (formerly known as “inference pipeline”).
Python
from openlayer import Openlayer
client = Openlayer()
response = client.inference_pipelines.rows.update(
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
inference_id="0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
row={"ground_truth": "The sun is about 93 million miles from the earth."},
config={"ground_truth_column_name": "ground_truth"},
)
print(response.success)
import Openlayer from 'openlayer';
const client = new Openlayer();
const response = await client.inferencePipelines.rows.update('c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f', {
inferenceId: '0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f',
row: { human_feedback: 'thumbs_up' },
config: { humanFeedbackColumnName: 'human_feedback' },
});
console.log(response.success);
package main
import (
"context"
"fmt"
"github.com/openlayer-ai/openlayer-go"
)
client := openlayer.NewClient()
response, err := client.InferencePipelines.Rows.Update(
context.TODO(),
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
openlayer.InferencePipelineRowUpdateParams{
InferenceID: openlayer.F("0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f"),
Row: openlayer.F[any](map[string]interface{}{
"ground_truth": "42",
}),
Config: openlayer.F(openlayer.InferencePipelineRowUpdateParamsConfig{
GroundTruthColumnName: openlayer.F("ground_truth"),
}),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Success)
import com.openlayer.api.client.OpenlayerClient;
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
import com.openlayer.api.core.JsonValue;
import com.openlayer.api.models.inferencepipelines.rows.RowUpdateParams;
import com.openlayer.api.models.inferencepipelines.rows.RowUpdateResponse;
import java.util.Map;
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
RowUpdateParams params = RowUpdateParams.builder()
.inferencePipelineId("c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f")
.inferenceId("0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f")
.row(JsonValue.from(Map.of("human_feedback", "thumbs_up")))
.config(RowUpdateParams.Config.builder()
.humanFeedbackColumnName("human_feedback")
.build())
.build();
RowUpdateResponse response = client.inferencePipelines().rows().update(params);
require "openlayer"
openlayer = Openlayer::Client.new(api_key: ENV["OPENLAYER_API_KEY"])
response = openlayer.inference_pipelines.rows.update(
"c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
inference_id: "0f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f",
row: {human_feedback: "thumbs_up"},
config: {human_feedback_column_name: "human_feedback"}
)
puts(response)
curl --request PUT \
--url https://api.openlayer.com/v1/inference-pipelines/{inferencePipelineId}/rows?inferenceId=832y98d3 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"row": {
"ground_truth": "The sun is 94.471 million miles from the earth."
},
"config": {
"groundTruthColumnName": "ground_truth",
}
}'
{
"success": true
}{
"code": 123,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your workspace API key. See Find your API key for more information.
Path Parameters
The inference pipeline id (a UUID).
Query Parameters
Specify the inference id as a query param.
Response
Status OK.
Available options:
true Was this page helpful?