|
@@ -9,7 +9,7 @@ from data_models.content_chunks import ContentChunks
|
|
|
def get_embedding_data(query):
|
|
def get_embedding_data(query):
|
|
|
try:
|
|
try:
|
|
|
response = requests.post(
|
|
response = requests.post(
|
|
|
- url='http://192.168.100.31:8001/api/search',
|
|
|
|
|
|
|
+ url='http://61.48.133.26:8001/api/search',
|
|
|
json={
|
|
json={
|
|
|
"query": query,
|
|
"query": query,
|
|
|
"search_type": "by_vector",
|
|
"search_type": "by_vector",
|
|
@@ -35,5 +35,5 @@ def get_embedding_content_data(query):
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
|
- results = get_embedding_content_data("AI绘图工具")
|
|
|
|
|
- print(json.dumps(results, ensure_ascii=False))
|
|
|
|
|
|
|
+ results = get_embedding_content_data("帮我查询一些篮球相关的知识")
|
|
|
|
|
+ print(results)
|