Skip to content

feat: add Resemble Detect + Intelligence tool#6500

Open
devshahofficial wants to merge 1 commit into
FlowiseAI:mainfrom
devshahofficial:plugin/resemble-detect-intelligence
Open

feat: add Resemble Detect + Intelligence tool#6500
devshahofficial wants to merge 1 commit into
FlowiseAI:mainfrom
devshahofficial:plugin/resemble-detect-intelligence

Conversation

@devshahofficial

@devshahofficial devshahofficial commented Jun 9, 2026

Copy link
Copy Markdown

Resemble Detect + Intelligence tool

Adds a Resemble tool node + Resemble API credential for Resemble AI
media safety: deepfake detection, media intelligence, and watermarking. Scope is
Detect + Intelligence only (no TTS / voice cloning).

What it adds

  • packages/components/nodes/tools/Resemble/ — node exposing a toolkit of
    DynamicStructuredTools to an agent:
    • resemble_detect — deepfake detection (audio/image/video) with toggles for
      intelligence, source tracing, visualize, reverse-search, OOD, zero-retention, model type
    • resemble_intelligence — transcription, translation, speaker info, emotion, misinformation
    • resemble_watermark_detect / resemble_watermark_apply
  • packages/components/credentials/ResembleApi.credential.ts — API-key credential.

Implementation

  • HTTP logic is in a dependency-free client.ts (global fetch), wrapped by core.ts
    into LangChain tools (@langchain/core/tools + zod/v3).
  • Bearer auth; async detection polls to completion; watermark uses Prefer: wait.
  • Large inline base64 artifacts (e.g. heatmaps) are stripped from tool output.

Testing

The client was run live against the Resemble API: media intelligence and watermark
detect/apply confirmed green; detection uses the same submit→poll path.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new integration for Resemble AI Detect + Intelligence, including credential configuration, a tool node, an HTTP client, and LangChain tool definitions. A critical issue was identified in the HTTP client (client.ts) where attempting to read the response as text after a failed JSON parsing attempt will throw a TypeError because the response stream is already consumed. It is recommended to read the response as text first and then parse it.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +40 to +45
let data: any
try {
data = await res.json()
} catch {
data = { raw: await res.text() }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

In the Fetch API, once a response body has been read (even if parsing fails), the stream is fully consumed and locked. Attempting to call res.text() in the catch block after res.json() fails will throw a TypeError: body stream already read instead of retrieving the raw text.

To fix this, read the response as text first, and then attempt to parse it as JSON.

    const text = await res.text()
    let data: any
    try {
        data = JSON.parse(text)
    } catch {
        data = { raw: text }
    }

Adds a Resemble tool node (toolkit of detect / intelligence / watermark
DynamicStructuredTools) and a Resemble API credential. HTTP logic in a
dependency-free client.ts; async detection polls to completion.
@devshahofficial devshahofficial force-pushed the plugin/resemble-detect-intelligence branch from 21674cb to d6c8adf Compare June 9, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant