Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown agent type when loading from hub #749

Closed
elier opened this issue Apr 11, 2023 · 2 comments
Closed

Unknown agent type when loading from hub #749

elier opened this issue Apr 11, 2023 · 2 comments

Comments

@elier
Copy link

elier commented Apr 11, 2023

Loading the following agent fails with "UnhandledPromiseRejectionWarning: Error: Unknown agent type":
https://github.com/hwchase17/langchain-hub/tree/master/agents/zero-shot-react-conversation

  const model = new ChatOpenAI({ temperature: 0});
  const tools: Tool[] = [new SerpAPI(), new Calculator()];
  const agent = await loadAgent(
    "lc://agents/zero-shot-react-conversation/agent.json",
    { llm: model, tools }
  );

However, the other agent works:
https://github.com/hwchase17/langchain-hub/tree/master/agents/zero-shot-react-description

The reason is very clear, only "zero-shot-react-description" is supported:

    /**
     * Load an agent from a json-like object describing it.
     */
    static async deserialize(data) {
        switch (data._type) {
            case "zero-shot-react-description": {
                const { ZeroShotAgent } = await import("./mrkl/index.js");
                return ZeroShotAgent.deserialize(data);
            }
            default:
                throw new Error("Unknown agent type");
        }
    }
@elier
Copy link
Author

elier commented Apr 11, 2023

I would like to load things from json or yaml configurations. Could someone provide details about the status of this feature, or what is the behaviour here so I could try to implement it and make a pull request.

@dosubot
Copy link

dosubot bot commented Aug 16, 2023

Hi, @elier! I'm helping the LangChain team manage their backlog and wanted to let you know that we are marking this issue as stale.

Based on my understanding, the issue you reported was about loading a specific agent from a GitHub repository and encountering an "Unknown agent type" error. It seems that the issue has been resolved, and it turns out that only the "zero-shot-react-description" agent is supported, not the "zero-shot-react-conversation" agent. You were also interested in the status of a feature that would allow loading from json or yaml configurations.

Before we close this issue, we wanted to check if it is still relevant to the latest version of the LangChain repository. If you could provide an update or any additional information, the LangChain team will be notified to take a look. Otherwise, if we don't hear back from you within 7 days, the issue will be automatically closed.

Thank you for your understanding!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Aug 16, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Aug 23, 2023
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

No branches or pull requests

1 participant