DeepSeek-V2 icon indicating copy to clipboard operation
DeepSeek-V2 copied to clipboard

无法支持 autogpt 中的 langchain

Open chenny opened this issue 9 months ago • 2 comments

单独 langchain 是支持. image

但是在 autogpt 中就不行了. image image

语言模型

llm = ChatOpenAI(
    openai_api_base="https://api.deepseek.com/v1",
    openai_api_key="sk-exxxxxxxxxxxxxxxxxxx6",
    model="deepseek-chat",
    temperature=0,
    model_kwargs={
        "seed": 42
    },
)

chenny avatar May 16 '24 14:05 chenny

+1

andakai avatar May 23 '24 06:05 andakai

这里报错的是 get_num_tokens_from_messages() 这个方法没有实现,在langchain的源码中,使用非gpt-3.5或者gpt-4的模型,都不支持计算tokens https://github.com/langchain-ai/langchain/blob/master/libs/partners/openai/langchain_openai/chat_models/base.py

xyh0202 avatar May 28 '24 01:05 xyh0202