ai-parrot 0.3.6__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ai-parrot might be problematic. Click here for more details.
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/Makefile +4 -3
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/PKG-INFO +1 -1
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/ai_parrot.egg-info/PKG-INFO +1 -1
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/ai_parrot.egg-info/SOURCES.txt +1 -0
- ai_parrot-0.3.8/examples/askbuddy/create_bot.py +32 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/videolocal.py +7 -5
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/stores/milvus.py +22 -18
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/version.py +1 -1
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.flake8 +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.github/dependabot.yml +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.github/workflows/codeql-analysis.yml +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.github/workflows/release.yml +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.gitignore +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.isort.cfg +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/.pylintrc +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/INSTALL +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/LICENSE +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/README.md +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/SECURITY.md +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/ai_parrot.egg-info/dependency_links.txt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/ai_parrot.egg-info/requires.txt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/ai_parrot.egg-info/top_level.txt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/app.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/AR_Certification_Skill_Practice_Scorecard_EXAMPLE.pdf +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/Day 1_Essentials_AR_PPT.pdf +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/ex-code-loaders.txt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/video_2024-09-11_19-43-58.mp3 +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/video_2024-09-11_19-43-58.mp4 +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/video_2024-09-11_19-43-58.vtt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/navigator-ssl.ini +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/navigator.ini +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/domain.ext +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/navigator.local.crt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/navigator.local.csr +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/navigator.local.key +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/rootCA.crt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/rootCA.key +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/etc/ssl/rootCA.srl +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/analyze_video.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/check_bot.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/extract_frames.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/load_pdf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/test_bot.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/examples/test_question.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/mypy.ini +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/abstract.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/asktroc.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/base.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/basic.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/bose.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/cody.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/copilot.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/dataframe.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/hragents.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/odoo.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/retrievals/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/chatbots/retrievals/constitutional.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/conf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/bing.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/config.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/duckgo.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/file.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/google.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/gtrends.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/md2pdf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/rag.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/search.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/crew/tools/url.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/exceptions.c +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/exceptions.pyx +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/handlers/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/handlers/bots.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/handlers/chat.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/interfaces/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/interfaces/database.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/abstract.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/anthropic.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/google.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/groq.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/hf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/openai.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/pipes.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/llms/vertex.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/abstract.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/audio.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/basepdf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/basevideo.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/csv.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/dir.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/excel.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/github.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/handlers/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/handlers/data.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/image.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/json.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdf.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdfchapters.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdffn.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdfimages.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdfmark.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/pdftables.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/ppt.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/qa.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/repo.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/rtd.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/txt.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/utils/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/utils/models.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/video.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/vimeo.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/web.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/web_base.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/word.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/loaders/youtube.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/manager.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/models.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/py.typed +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/stores/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/stores/abstract.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/stores/qdrant.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/abstract.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/asknews.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/bing.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/duck.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/google.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/stack.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/weather.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/wikipedia.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/tools/zipcode.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/parsers/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/parsers/toml.c +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/parsers/toml.pyx +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/toml.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/types.cpp +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/types.pyx +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/parrot/utils/uv.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/pyproject.toml +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/pytest.ini +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/requirements/requirements-dev.txt +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/resources/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/resources/quick.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/resources/users/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/resources/users/handlers.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/resources/users/models.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/run.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/settings/__init__.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/settings/settings.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/setup.cfg +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/setup.py +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/templates/.compiled +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/templates/README.md +0 -0
- {ai_parrot-0.3.6 → ai_parrot-0.3.8}/tox.ini +0 -0
|
@@ -5,14 +5,15 @@ venv:
|
|
|
5
5
|
install:
|
|
6
6
|
# Install Parrot
|
|
7
7
|
pip install --upgrade python-datamodel
|
|
8
|
-
pip install --upgrade asyncdb[
|
|
8
|
+
pip install --upgrade asyncdb[default,bigquery]
|
|
9
9
|
pip install --upgrade navconfig[default]
|
|
10
|
-
pip install --upgrade navigator-api[locale]
|
|
10
|
+
pip install --upgrade navigator-api[uvloop,locale]
|
|
11
11
|
# Nav requirements:
|
|
12
12
|
pip install --upgrade navigator-session
|
|
13
13
|
pip install --upgrade navigator-auth
|
|
14
14
|
# QS requirements
|
|
15
|
-
pip install --upgrade querysource[analytics]
|
|
15
|
+
# pip install --upgrade querysource[analytics]
|
|
16
|
+
pip install --upgrade querysource
|
|
16
17
|
# and Parrot:
|
|
17
18
|
# pip install -e .[google,milvus,groq,analytics]
|
|
18
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ai-parrot
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Live Chatbots based on Langchain chatbots and Agents Integrated into Navigator Framework or used into aiohttp applications.
|
|
5
5
|
Home-page: https://github.com/phenobarbital/ai-parrot
|
|
6
6
|
Author: Jesus Lara
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ai-parrot
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: Live Chatbots based on Langchain chatbots and Agents Integrated into Navigator Framework or used into aiohttp applications.
|
|
5
5
|
Home-page: https://github.com/phenobarbital/ai-parrot
|
|
6
6
|
Author: Jesus Lara
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from parrot.chatbots.basic import Chatbot
|
|
3
|
+
from parrot.llms.vertex import VertexLLM
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
async def get_agent():
|
|
7
|
+
"""Return the New Agent.
|
|
8
|
+
"""
|
|
9
|
+
llm = VertexLLM(
|
|
10
|
+
model='gemini-1.5-pro',
|
|
11
|
+
temperature=0.1,
|
|
12
|
+
top_k=30,
|
|
13
|
+
Top_p=0.6,
|
|
14
|
+
)
|
|
15
|
+
agent = Chatbot(
|
|
16
|
+
name='AskBuddy',
|
|
17
|
+
llm=llm
|
|
18
|
+
)
|
|
19
|
+
await agent.configure()
|
|
20
|
+
# Create the Collection
|
|
21
|
+
if agent.store.collection_exists('employee_information'):
|
|
22
|
+
await agent.store.delete_collection('employee_information')
|
|
23
|
+
await agent.store.create_collection( # pylint: disable=E1120
|
|
24
|
+
collection_name='employee_information',
|
|
25
|
+
dimension=768,
|
|
26
|
+
index_type="IVF_SQ8",
|
|
27
|
+
metric_type='L2'
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
agent = asyncio.run(get_agent())
|
|
@@ -84,11 +84,13 @@ class VideoLocalLoader(BaseVideoLoader):
|
|
|
84
84
|
if transcript_whisper:
|
|
85
85
|
# VTT version:
|
|
86
86
|
transcript = self.transcript_to_vtt(transcript_whisper, transcript_path)
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
transcript_chunks = split_text(transcript, 65535)
|
|
88
|
+
for chunk in transcript_chunks:
|
|
89
|
+
doc = Document(
|
|
90
|
+
page_content=chunk,
|
|
91
|
+
metadata=metadata
|
|
92
|
+
)
|
|
93
|
+
documents.append(doc)
|
|
92
94
|
# Saving every dialog chunk as a separate document
|
|
93
95
|
dialogs = self.transcript_to_blocks(transcript_whisper)
|
|
94
96
|
docs = []
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from typing import Optional, Union, Any
|
|
2
2
|
import asyncio
|
|
3
|
-
import uuid
|
|
4
|
-
import torch
|
|
3
|
+
# import uuid
|
|
4
|
+
# import torch
|
|
5
5
|
from pymilvus import (
|
|
6
6
|
MilvusClient,
|
|
7
|
-
Collection,
|
|
8
|
-
FieldSchema,
|
|
9
|
-
CollectionSchema,
|
|
7
|
+
# Collection,
|
|
8
|
+
# FieldSchema,
|
|
9
|
+
# CollectionSchema,
|
|
10
10
|
DataType,
|
|
11
11
|
connections,
|
|
12
12
|
db
|
|
@@ -148,10 +148,10 @@ class MilvusStore(AbstractStore):
|
|
|
148
148
|
)
|
|
149
149
|
|
|
150
150
|
async def __aenter__(self):
|
|
151
|
-
try:
|
|
152
|
-
|
|
153
|
-
except RuntimeError:
|
|
154
|
-
|
|
151
|
+
# try:
|
|
152
|
+
# self.tensor = torch.randn(1000, 1000).cuda()
|
|
153
|
+
# except RuntimeError:
|
|
154
|
+
# self.tensor = None
|
|
155
155
|
if self._embed_ is None:
|
|
156
156
|
self._embed_ = self.create_embedding(
|
|
157
157
|
model_name=self.embedding_name
|
|
@@ -161,10 +161,10 @@ class MilvusStore(AbstractStore):
|
|
|
161
161
|
async def __aexit__(self, exc_type, exc_value, traceback):
|
|
162
162
|
# closing Embedding
|
|
163
163
|
self._embed_ = None
|
|
164
|
-
del self.tensor
|
|
164
|
+
# del self.tensor
|
|
165
165
|
try:
|
|
166
166
|
self.close(alias=self._client_id)
|
|
167
|
-
torch.cuda.empty_cache()
|
|
167
|
+
# torch.cuda.empty_cache()
|
|
168
168
|
except RuntimeError:
|
|
169
169
|
pass
|
|
170
170
|
|
|
@@ -199,7 +199,10 @@ class MilvusStore(AbstractStore):
|
|
|
199
199
|
connections.disconnect(alias=alias)
|
|
200
200
|
try:
|
|
201
201
|
self._client.close()
|
|
202
|
+
except AttributeError:
|
|
203
|
+
pass
|
|
202
204
|
finally:
|
|
205
|
+
self._client = None
|
|
203
206
|
self._connected = False
|
|
204
207
|
|
|
205
208
|
def create_db(self, db_name: str, alias: str = 'default', **kwargs) -> bool:
|
|
@@ -269,8 +272,9 @@ class MilvusStore(AbstractStore):
|
|
|
269
272
|
return self.get_vector()
|
|
270
273
|
|
|
271
274
|
def collection_exists(self, collection_name: str) -> bool:
|
|
272
|
-
|
|
273
|
-
|
|
275
|
+
with self.connection():
|
|
276
|
+
if collection_name in self._client.list_collections():
|
|
277
|
+
return True
|
|
274
278
|
return False
|
|
275
279
|
|
|
276
280
|
def check_state(self, collection_name: str) -> dict:
|
|
@@ -478,10 +482,10 @@ class MilvusStore(AbstractStore):
|
|
|
478
482
|
):
|
|
479
483
|
if not collection:
|
|
480
484
|
collection = self.collection
|
|
481
|
-
try:
|
|
482
|
-
|
|
483
|
-
except Exception:
|
|
484
|
-
|
|
485
|
+
# try:
|
|
486
|
+
# tensor = torch.randn(1000, 1000).cuda()
|
|
487
|
+
# except Exception:
|
|
488
|
+
# tensor = None
|
|
485
489
|
if upsert is True:
|
|
486
490
|
# get first document
|
|
487
491
|
doc = documents[0]
|
|
@@ -510,7 +514,7 @@ class MilvusStore(AbstractStore):
|
|
|
510
514
|
vector_field='vector',
|
|
511
515
|
**kwargs
|
|
512
516
|
)
|
|
513
|
-
del tensor
|
|
517
|
+
# del tensor
|
|
514
518
|
return docstore
|
|
515
519
|
|
|
516
520
|
def upsert(self, payload: dict, collection: str = None) -> None:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
__title__ = "ai-parrot"
|
|
4
4
|
__description__ = "Live Chatbots based on Langchain chatbots and Agents \
|
|
5
5
|
Integrated into Navigator Framework or used into aiohttp applications."
|
|
6
|
-
__version__ = "0.3.
|
|
6
|
+
__version__ = "0.3.8"
|
|
7
7
|
__author__ = "Jesus Lara"
|
|
8
8
|
__author_email__ = "jesuslarag@gmail.com"
|
|
9
9
|
__license__ = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ai_parrot-0.3.6 → ai_parrot-0.3.8}/documents/AR_Certification_Skill_Practice_Scorecard_EXAMPLE.pdf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|