forked from dataelement/bisheng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7227d7
commit 5ab5179
Showing
11 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from bisheng_langchain.embeddings import HostEmbeddings | ||
from bisheng_langchain.vectorstores import Milvus | ||
from sqlmodel import Session, create_engine | ||
|
||
params = {} | ||
params['connection_args'] = { | ||
'host': '192.168.106.116', | ||
'port': '19530', | ||
'user': '', | ||
'password': '', | ||
'secure': False | ||
} | ||
params['documents'] = [] | ||
embedding = HostEmbeddings(model='multilingual-e5-large', | ||
host_base_url='http://192.168.106.12:9001/v2.1/models') | ||
|
||
database_url = 'mysql+pymysql://root:[email protected]:3306/langflow?charset=utf8mb4' | ||
engine = create_engine(database_url, connect_args={}, pool_pre_ping=True) | ||
with Session(engine) as session: | ||
db_knowledge = session.exec('select id, collection_name, model from knowledge').all() | ||
for knowledge in db_knowledge: | ||
|
||
if knowledge[1].startswith('col'): | ||
params['collection_name'] = knowledge[1] | ||
cli = Milvus.from_documents(embedding=embedding, **params) | ||
li = cli.col.query(expr='file_id>1') | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ def _test_python_code(): | |
|
||
|
||
def _test_uns(): | ||
|
||
import base64 | ||
import requests | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v0.1.10 | ||
v0.2.1.1 |