Skip to content

Commit

Permalink
chore: 川虎助理适配最新版本的openai和langchain
Browse files Browse the repository at this point in the history
  • Loading branch information
GaiZhenbiao committed Dec 4, 2023
1 parent 4799527 commit ed2aa75
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/models/ChuanhuAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from langchain.tools import BaseTool, StructuredTool, Tool, tool
from langchain.callbacks.stdout import StdOutCallbackHandler
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.callbacks.manager import BaseCallbackManager
from langchain.callbacks.base import BaseCallbackManager
from duckduckgo_search import DDGS
from itertools import islice

Expand Down
2 changes: 1 addition & 1 deletion modules/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from enum import Enum

from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.callbacks.manager import BaseCallbackManager
from langchain.callbacks.base import BaseCallbackManager

from typing import Any, Dict, List, Optional, Union

Expand Down
1 change: 1 addition & 0 deletions modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def save_file(filename, model, chatbot):
"system": system,
"history": history,
"chatbot": chatbot,
"model_name": model.model_name,
"single_turn": model.single_turn,
"temperature": model.temperature,
"top_p": model.top_p,
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ tqdm
colorama
googlesearch-python
Pygments
langchain==0.0.316
openai==1.3.7
langchain==0.0.345
markdown
PyPDF2
pdfplumber
Expand All @@ -22,14 +23,13 @@ duckduckgo-search>=3.9.5
arxiv
wikipedia
google.generativeai
openai==0.28.1
unstructured
google-api-python-client
tabulate
ujson
python-docx
websocket_client
pydantic==1.10.8
pydantic==2.5.2
google-search-results
anthropic==0.3.11
Pillow>=10.1.0

0 comments on commit ed2aa75

Please sign in to comment.