Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Conversation

@afsalthaj
Copy link
Contributor

@afsalthaj afsalthaj commented Dec 17, 2025

Fix #2325 and some others

There are multiple issues, 1 is in golem which will be fixed while updating TS SDK

  1. constructor parameter in RPC calls not working (which is basically #2325) multimodal values not supported during RPC call

  2. getId was not working. This was giving agent not initialized error which was confusing. Anyway fixed.

  3. Multimodal when part of return type wasn't working

  4. When language code was empty, it threw an error Invalid inline text language code type: expected string

  5. There is a bug back in golem for makeAgentId when data-value (input) is multimodal with some length mismatch error. Small fix which is in fix_multimodal_agent branch, and will be raised as PR when updating the TS SDK branch

For the following code, which takes Multimodal everywhere (methods, constructors, RPC), the fixes worked

import {
    BaseAgent,
    Result,
    agent,
    prompt,
    description, Client, Multimodal, MultimodalAdvanced,
} from '@golemcloud/golem-ts-sdk';

@agent()
class CounterAgent extends BaseAgent {
   // This wasn't working
    constructor(readonly input: Multimodal) {
        super()
    }
   
    // This wasn't working
    async get_agent_id(): Promise<string> {
        return this.getId().value
    }

    async foo(input: Multimodal): Promise<Multimodal> {
    
        const client = BarAgent.get(input); // input to RPC was not working
        return await client.foo(input);
    }
}


@agent()
class BarAgent extends BaseAgent {
    constructor(readonly input: Multimodal) {
        super()
    }

    async foo(input: Multimodal): Promise<Multimodal> { // Return type was not working
        return input
    }


}
image

@afsalthaj afsalthaj marked this pull request as ready for review December 19, 2025 03:34
@afsalthaj afsalthaj merged commit 095f7ff into main Dec 19, 2025
2 checks passed
@afsalthaj afsalthaj deleted the start_fixing_multimodal branch December 19, 2025 03:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants