Skip to content

Commit

Permalink
fetch by workspace id(number) and agent sId (string)
Browse files Browse the repository at this point in the history
  • Loading branch information
overmode committed Dec 30, 2024
1 parent 89ce835 commit 5d2f7a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion front/lib/api/assistant/feedback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export async function getAgentFeedbacks({
}

const feedbacksRes = await AgentMessageFeedbackResource.fetch({
workspaceId: owner.sId,
workspaceId: owner.id,
agentConfiguration,
filters,
withMetadata,
Expand Down
8 changes: 5 additions & 3 deletions front/lib/resources/agent_message_feedback_resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class AgentMessageFeedbackResource extends BaseResource<AgentMessageFeedb
agentConfiguration,
filters,
}: {
workspaceId: string;
workspaceId: number;
withMetadata: boolean;
agentConfiguration?: AgentConfigurationType;
filters?: {
Expand Down Expand Up @@ -132,9 +132,11 @@ export class AgentMessageFeedbackResource extends BaseResource<AgentMessageFeedb
const agentMessageFeedback = await AgentMessageFeedback.findAll({
where: {
// Necessary for global models who share ids across workspaces
workspaceId,
workspaceId: workspaceId.toString(),
// These clauses are optional
agentConfigurationId: agentConfiguration?.id,
agentConfigurationId: agentConfiguration?.sId
? agentConfiguration.sId.toString()
: undefined,
...createdAtClause,
},

Expand Down

0 comments on commit 5d2f7a9

Please sign in to comment.