- 博客(9)
- 收藏
- 关注
原创 pip install flask 出现错误:ERROR: Cannot uninstall ‘blinker‘. It is a distutils installed project ...
错误信息:ERROR: Cannot uninstall 'blinker'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.接下来就能安装flask了。
2025-02-08 11:15:36
745
1
原创 agentscope 调用 deepseek
注意:deepseek-reasoner为DeepSeek-R1版本,deepseek-chat为 DeepSeek-V3。1.查看deepseek官方文档是否与openai兼容。2.修改agentscope的模型配置文件即可调用。发现兼容之后,获取API key。
2025-02-06 10:43:43
952
原创 agentscope 中的Agent
agentscope框架内置了多个agent类型,用于完成不同的任务,例如:DialogAgent、DictDialogAgent、ReActAgent等等。他们都有一个共同的父类Agentscope,当我们要自定义agent的时候必须要继承该类。reply()方法,接受一个Msg对象,用于接受外部消息,并进行处理的方法,每个集成Agentbase父类的都必须实现这个方法。model_config_name(str):所使用的llm的配置名字,如qwen-max,这个首先要初始化才能调用LLM。
2025-01-07 17:38:24
561
原创 LangChain封装本地Qwen2.5LLM
首先必须重写“_llm_type”和“_call”这两个方法,这是官方规定的,_llm_type方法用于返回自定义大模型的类型,随便写就行。_call方法接收的参数是一个字符串(就是你的prompt信息)和一些可选的停止词,返回值是一个字符串(就是自定义的大模型的输出值)。着重注意的是:_call方法内部调用自定义大模型产生输出的逻辑是要自己定义的。langchain, langchain_community, langchain_core, transformers等。
2024-11-10 11:23:23
1003
原创 import streamlit出现:Descriptors cannot be created directly.No module named ‘altair.vegalite.v4‘错误
接着出现了第二个错误:ModuleNotFoundError: Noy module named 'altair.vegalite.v4'”原因分析:streamlit和protobuf不兼容,protobuf版本太高了,降低版本。第一个错误:Descriptors cannot be created directly.原因分析:streamlit与altair的版本不兼容,换一个版本安装即可。出错代码,导入streamlit时出现错误。接着就可以正常运行了。
2024-11-08 20:22:25
551
原创 langchain_huggingface 加载m3eEmbedding模型
出错原因:transformers和accelerate包出现了冲突。就可以正常加载本地Embedding模型了。
2024-11-08 11:31:16
665
原创 langchain document_loaders出错ImportError: failed to find libmagic. Check your installation
报错:ImportError: failed to find libmagic. Check your installation。接着出现了新的错误如下。
2024-11-07 20:44:10
798
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅