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

ChatDeepInfra does not implement bindTools #7020

Open
5 tasks done
maharifu opened this issue Oct 18, 2024 · 3 comments · May be fixed by #7126
Open
5 tasks done

ChatDeepInfra does not implement bindTools #7020

maharifu opened this issue Oct 18, 2024 · 3 comments · May be fixed by #7126
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature

Comments

@maharifu
Copy link

maharifu commented Oct 18, 2024

Checked other resources

  • I added a very descriptive title to this issue.
  • I searched the LangChain.js documentation with the integrated search.
  • I used the GitHub search to find a similar question and didn't find it.
  • I am sure that this is a bug in LangChain.js rather than my code.
  • The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

Example Code

Following the quickstart tutorial here, but replacing ChatOpenAI with ChatDeepInfra like this:

const model = new ChatDeepInfra({
  model: 'meta-llama/Meta-Llama-3-70B-Instruct',
  temperature: 0,
  apiKey: 'XXXXX',
}).bindTools(tools);

Error Message and Stack Trace (if applicable)

TypeError: (intermediate value).bindTools is not a function

Description

  • I'm trying to to build an agent using ChatDeepInfra with tools
  • I would expect it to implement bindTools, like the python version
  • Instead I get an error

System Info

npm info langchain

[email protected] | MIT | deps: 12 | versions: 297
Typescript bindings for langchain
https://github.com/langchain-ai/langchainjs/tree/main/langchain/

keywords: llm, ai, gpt3, chain, prompt, prompt engineering, chatgpt, machine learning, ml, openai, embeddings, vectorstores

dist
.tarball: https://registry.npmjs.org/langchain/-/langchain-0.3.2.tgz
.shasum: aec3e679d3d6c36f469448380affa475c92fbd86
.integrity: sha512-kd2kz1cS/PIVrLEDFlrZsAasQfPLbY1UqCZbRKa3/QcpB33/n6xPDvXSMfBuKhvNj0bjW6MXDR9HZTduXjJBgg==
.unpackedSize: 2.9 MB

dependencies:
@langchain/openai: >=0.1.0 <0.4.0        openapi-types: ^12.1.3
@langchain/textsplitters: >=0.0.0 <0.2.0 p-retry: 4
js-tiktoken: ^1.0.12                     uuid: ^10.0.0
js-yaml: ^4.1.0                          yaml: ^2.2.1
jsonpointer: ^5.0.1                      zod-to-json-schema: ^3.22.3
langsmith: ^0.1.56-rc.1                  zod: ^3.22.4

maintainers:
- nfcampos <[email protected]>
- jacoblee93 <[email protected]>
- andrewnguonly <[email protected]>
- davidduong <[email protected]>
- hwchase17 <[email protected]>
- basproul <[email protected]>

dist-tags:
latest: 0.3.2                              tag-for-publishing-older-releases: 0.2.20
next: 0.3.2-rc.0

published a month ago by jacoblee93 <[email protected]>
node --version
v20.10.0

Platform: Linux

Copy link

dosubot bot commented Oct 18, 2024

Hey @maharifu! 👋 I'm here to help you with bugs, questions, and more while you wait for a human maintainer.

The TypeError: (intermediate value).bindTools is not a function issue occurs because the ChatDeepInfra class in LangChain.js does not implement the bindTools method. This is a known limitation, as there is no documentation or comments in the LangChain.js codebase that describe the tool integration capabilities of ChatDeepInfra or any alternative methods for binding tools with it [1][2].

If you are looking for similar issues, there is a related discussion about the bindTools method not being implemented for certain models, such as ChatOpenAI, which might provide some context or potential workarounds [3]. However, for ChatDeepInfra, there is currently no direct solution or alternative method available in the LangChain.js repository.

To continue talking to Dosu, mention @dosu.

@dosubot dosubot bot added the auto:bug Related to a bug, vulnerability, unexpected error with an existing feature label Oct 18, 2024
@taariq
Copy link

taariq commented Oct 18, 2024

Hey there @ovuruska. Would you be able to help here from the Deep Infra side?

@MirrorLimit
Copy link

MirrorLimit commented Oct 24, 2024

Hi, we're a group of students from the University of Toronto and we can take a look at this and see what we can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants