Skip to content

Commit

Permalink
pyproject (#395)
Browse files Browse the repository at this point in the history
pyproject 更新
  • Loading branch information
yaojin3616 committed Mar 18, 2024
2 parents 5c3394c + f2ff5ce commit f447738
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 467 deletions.
2 changes: 1 addition & 1 deletion src/backend/bisheng/interface/custom_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from bisheng_langchain import embeddings as contribute_embeddings
from langchain import document_loaders, embeddings, llms, memory, requests, text_splitter
from langchain.agents import agent_toolkits
from langchain.chat_models import AzureChatOpenAI, ChatAnthropic, ChatOpenAI, ChatVertexAI
from langchain_community.chat_models import AzureChatOpenAI, ChatAnthropic, ChatOpenAI, ChatVertexAI

# LLMs
llm_type_to_cls_dict = {}
Expand Down
3 changes: 2 additions & 1 deletion src/backend/bisheng/interface/initialize/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ def instantiate_wrapper(node_type, class_object, params):
return class_method(**params)
raise ValueError(f'Method {method} not found in {class_object}')
if node_type == 'DallEAPIWrapper' and is_openai_v1():
params['http_client'] = httpx.Client(proxy=params.get('openai_proxy'))
if 'openai_proxy' in params:
params['http_client'] = httpx.Client(proxy=params.get('openai_proxy'))

return class_object(**params)

Expand Down
5 changes: 3 additions & 2 deletions src/backend/bisheng/template/frontend_node/memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
from bisheng.template.frontend_node.base import FrontendNode
from bisheng.template.frontend_node.constants import INPUT_KEY_INFO, OUTPUT_KEY_INFO
from bisheng.template.template.base import Template
from langchain.memory.chat_message_histories.mongodb import DEFAULT_COLLECTION_NAME, DEFAULT_DBNAME
from langchain.memory.chat_message_histories.postgres import DEFAULT_CONNECTION_STRING
from langchain_community.chat_message_histories.mongodb import (DEFAULT_COLLECTION_NAME,
DEFAULT_DBNAME)
from langchain_community.chat_message_histories.postgres import DEFAULT_CONNECTION_STRING


class MemoryFrontendNode(FrontendNode):
Expand Down
4 changes: 2 additions & 2 deletions src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ google-search-results = "^2.4.1"
google-api-python-client = "^2.79.0"
typer = "^0.9.0"
gunicorn = "^20.1.0"
langchain = "^0.0.349"
langchain = "^0.1.0"
langchain_experimental = "0.0.43"
openai = "^1.6.0"
openai = "^1.12.0"
pandas = "^2.0.0"
chromadb = "^0.3.21"
rich = "^13.4.2"
Expand Down
Loading

0 comments on commit f447738

Please sign in to comment.