@overmap-ai/core 1.0.48-add-agent-response-rating.1 → 1.0.48-add-agent-response-rating.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/overmap-core.js
CHANGED
|
@@ -4254,7 +4254,17 @@ function runMiddleware(action) {
|
|
|
4254
4254
|
const discardStatuses = [400, 409, 403, 404, 405, 500];
|
|
4255
4255
|
const statusMessages = {
|
|
4256
4256
|
403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
|
|
4257
|
-
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
|
|
4257
|
+
404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
|
|
4258
|
+
405: {
|
|
4259
|
+
title: "Not supported",
|
|
4260
|
+
description: "It's not you. It's us. Sorry for the inconvenience.",
|
|
4261
|
+
severity: "danger"
|
|
4262
|
+
},
|
|
4263
|
+
500: {
|
|
4264
|
+
title: "Server error",
|
|
4265
|
+
description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
|
|
4266
|
+
severity: "danger"
|
|
4267
|
+
}
|
|
4258
4268
|
};
|
|
4259
4269
|
function discard(reason, action, retries = 0) {
|
|
4260
4270
|
var _a2;
|
|
@@ -7503,7 +7513,7 @@ class AgentService extends BaseApiService {
|
|
|
7503
7513
|
const activeProjectId = this.client.store.getState().projectReducer.activeProjectId;
|
|
7504
7514
|
return this.enqueueRequest({
|
|
7505
7515
|
description: "Prompt agent",
|
|
7506
|
-
method: HttpMethod.
|
|
7516
|
+
method: HttpMethod.POST,
|
|
7507
7517
|
url: "/agents/prompt/",
|
|
7508
7518
|
payload: {
|
|
7509
7519
|
prompt: request2,
|
|
@@ -7517,7 +7527,7 @@ class AgentService extends BaseApiService {
|
|
|
7517
7527
|
async rate(responseId, rating) {
|
|
7518
7528
|
return this.enqueueRequest({
|
|
7519
7529
|
description: "Rate agent response",
|
|
7520
|
-
method: HttpMethod.
|
|
7530
|
+
method: HttpMethod.PUT,
|
|
7521
7531
|
url: `/agents/responses/${responseId}/rate/`,
|
|
7522
7532
|
payload: { rating },
|
|
7523
7533
|
blockers: ["rate"],
|