langchain icon indicating copy to clipboard operation
langchain copied to clipboard

DOC: <Issue related to /v0.2/docs/integrations/text_embedding/baidu_qianfan_endpoint/>

Open macoli opened this issue 7 months ago β€’ 1 comments

URL

https://python.langchain.com/v0.2/docs/integrations/text_embedding/baidu_qianfan_endpoint/

Checklist

  • [X] I added a very descriptive title to this issue.
  • [X] I included a link to the documentation page I am referring to (if applicable).

Issue with current documentation:

I run the sample code and get an error.How to solve it?

Operating environment: python 3.10 langchain-community 0.2.7 qianfan 0.4.0.1

Run the code: `import os

from langchain_community.embeddings import QianfanEmbeddingsEndpoint

os.environ["QIANFAN_AK"] = "xxx" os.environ["QIANFAN_SK"] = "xxx"

embed = QianfanEmbeddingsEndpoint() res = embed.embed_documents(["hi", "world"]) print(res)`

Error message: Traceback (most recent call last): File "/llm-example/langchain/test.py", line 9, in <module> embed = QianfanEmbeddingsEndpoint() File "/llm-example/langchain/.venv/lib/python3.10/site-packages/pydantic/v1/main.py", line 341, in __init__ raise validation_error pydantic.v1.error_wrappers.ValidationError: 2 validation errors for QianfanEmbeddingsEndpoint qianfan_ak str type expected (type=type_error.str) qianfan_sk str type expected (type=type_error.str)

Idea or request for content:

No response

macoli avatar Jul 11 '24 01:07 macoli