Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix http of default milvus uri #86

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
# Vector db configs
VECTORDB_CONFIG = {
'connection_args': {
'uri': os.getenv('MILVUS_URI', 'https://localhost:19530'),
'uri': os.getenv('MILVUS_URI', 'http://localhost:19530'),
'user': os.getenv('MILVUS_USER', ''),
'password': os.getenv('MILVUS_PASSWORD', ''),
'secure': True if os.getenv('MILVUS_SECURE', 'False').lower() == 'true' else False
Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ transformers
dashscope
zhipuai
sentence-transformers
erniebot
erniebot==0.4.0
6 changes: 3 additions & 3 deletions tests/unit_tests/src_langchain/llm/test_ernie.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class TestERNIE(unittest.TestCase):
def test_generate(self):
from erniebot.response import EBResponse
with patch('erniebot.ChatCompletion.create') as mock_post:
mock_res = EBResponse(code=200,
body={'id': 'as-0000000000', 'object': 'chat.completion', 'created': 11111111,
mock_res = EBResponse(rcode=200,
rbody={'id': 'as-0000000000', 'object': 'chat.completion', 'created': 11111111,
'result': 'OK, this is a mock answer.',
'usage': {'prompt_tokens': 1, 'completion_tokens': 13, 'total_tokens': 14},
'need_clear_history': False, 'is_truncated': False},
headers={'Connection': 'keep-alive',
rheaders={'Connection': 'keep-alive',
'Content-Security-Policy': 'frame-ancestors https://*.baidu.com/',
'Content-Type': 'application/json', 'Date': 'Mon, 23 Oct 2023 03:30:53 GMT',
'Server': 'nginx', 'Statement': 'AI-generated',
Expand Down
6 changes: 3 additions & 3 deletions tests/unit_tests/src_towhee/pipelines/test_pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ def test_ernie(self):
from erniebot.response import EBResponse

with patch('erniebot.ChatCompletion.create') as mock_post:
mock_res = EBResponse(code=200,
body={'id': 'as-0000000000', 'object': 'chat.completion', 'created': 11111111,
mock_res = EBResponse(rcode=200,
rbody={'id': 'as-0000000000', 'object': 'chat.completion', 'created': 11111111,
'result': MOCK_ANSWER,
'usage': {'prompt_tokens': 1, 'completion_tokens': 13, 'total_tokens': 14},
'need_clear_history': False, 'is_truncated': False},
headers={'Connection': 'keep-alive',
rheaders={'Connection': 'keep-alive',
'Content-Security-Policy': 'frame-ancestors https://*.baidu.com/',
'Content-Type': 'application/json', 'Date': 'Mon, 23 Oct 2023 03:30:53 GMT',
'Server': 'nginx', 'Statement': 'AI-generated',
Expand Down
Loading