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

"Minimax" object has no field "_client" #10917

Closed
2 of 14 tasks
cclc opened this issue Sep 22, 2023 · 6 comments
Closed
2 of 14 tasks

"Minimax" object has no field "_client" #10917

cclc opened this issue Sep 22, 2023 · 6 comments
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: models Related to LLMs or chat model modules

Comments

@cclc
Copy link

cclc commented Sep 22, 2023

System Info

when I run this command python3 ./libs/langchain/tests/integration_tests/llms/test_minimax.py
It always reports this error ValueError: "Minimax" object has no field "_client"

After I replaced "_client" with "client", it works.

version is langchain==0.0.297

Who can help?

No response

Information

  • The official example notebooks/scripts
  • My own modified scripts

Related Components

  • LLMs/Chat Models
  • Embedding Models
  • Prompts / Prompt Templates / Prompt Selectors
  • Output Parsers
  • Document Loaders
  • Vector Stores / Retrievers
  • Memory
  • Agents / Agent Executors
  • Tools / Toolkits
  • Chains
  • Callbacks/Tracing
  • Async

Reproduction

python3 ./libs/langchain/tests/integration_tests/llms/test_minimax.py

Expected behavior

Don't throw erros

@dosubot dosubot bot added Ɑ: models Related to LLMs or chat model modules 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Sep 22, 2023
@dosubot
Copy link

dosubot bot commented Sep 22, 2023

🤖

Hello,

Thank you for bringing this to our attention. It seems like you've encountered an issue with the Minimax class in the LangChain codebase. The error you're seeing, ValueError: "Minimax" object has no field "_client", is likely due to the _client attribute not being initialized when a Minimax object is created.

This could be due to a change in the structure of the Minimax class in the LangChain codebase. In the current version of LangChain that you're using (langchain==0.0.297), the Minimax class might not have the _client attribute.

However, I noticed that you mentioned that after replacing _client with client, it works. This suggests that the attribute name might have been updated in the newer versions of LangChain.

The latest version of LangChain is v0.0.299. I would recommend updating to the latest version and see if the issue persists. You can update LangChain by running the following command:

pip install --upgrade langchain

If the issue still persists after updating, please let us know. We appreciate your patience and cooperation in this matter.

Best regards,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@cclc
Copy link
Author

cclc commented Sep 22, 2023

In v0.0.299, This problem still exists

@zirenlegend
Copy link

In v0.0.312, This problem still exists

@hunter-xue
Copy link

hunter-xue commented Oct 17, 2023

this should be an issue of pydantic v1, looks like pydantic v2 fix it. so the better way to resolve this problem is: DON'T use function name start with underscore in python model class.

baskaryan added a commit that referenced this issue Oct 30, 2023
e #11648 Minimax
llm failed to initialize

The idea of this fix is
#10917 (comment)

do not use  underscore in python model class

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Bagatur <[email protected]>
xieqihui pushed a commit to xieqihui/langchain that referenced this issue Nov 21, 2023
…i#12554)

e langchain-ai#11648 Minimax
llm failed to initialize

The idea of this fix is
langchain-ai#10917 (comment)

do not use  underscore in python model class

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Bagatur <[email protected]>
@geezerrrr
Copy link

Has this problem been resolved?

hoanq1811 pushed a commit to hoanq1811/langchain that referenced this issue Feb 2, 2024
…i#12554)

e langchain-ai#11648 Minimax
llm failed to initialize

The idea of this fix is
langchain-ai#10917 (comment)

do not use  underscore in python model class

---------

Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Bagatur <[email protected]>
@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 7, 2024
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2024
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Apr 14, 2024
@oldpiao
Copy link

oldpiao commented Aug 29, 2024

这个问题还没有解决吗?我在0.2.15上依然遇到了此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: models Related to LLMs or chat model modules
Projects
None yet
Development

No branches or pull requests

5 participants