diff --git a/docs/conf.py b/docs/conf.py index 1b4e82c..65739bb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,7 @@ project = 'magnet' copyright = '2023, Prismadic, LLC' author = 'Prismadic, LLC.' -release = '0.3.11' +release = '0.3.12' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration @@ -29,7 +29,7 @@ display_github = True html_logo = "../magnet.png" pygments_style = 'dracula' -version = "v0.3.11" +version = "v0.3.12" release = "latest" # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output diff --git a/magnet/ic/field.py b/magnet/ic/field.py index 2fbe278..863430b 100644 --- a/magnet/ic/field.py +++ b/magnet/ic/field.py @@ -285,6 +285,7 @@ async def deliver_messages(msgs): loop.create_task(cb(self.magnet.os, e)) await asyncio.sleep(1) else: + _f("info", f'consuming delta from [{self.magnet.config.category}] on\n🛰️ stream: {self.magnet.config.stream_name}\n🧲 session: "{self.magnet.config.session}"') while True: try: msgs = await self.sub.fetch(batch=1, timeout=60) @@ -302,7 +303,6 @@ async def deliver_messages(msgs): _f("warn", f'retrying connection to {self.magnet.config.host.split("@")[1]}\n{e}') _f("info", "this can also be a problem with your callback") await asyncio.sleep(1) - _f("info", f'consuming delta from [{self.magnet.config.category}] on\n🛰️ stream: {self.magnet.config.stream_name}\n🧲 session: "{self.magnet.config.session}"') async def worker(self, cb=print): diff --git a/magnet/ize/memory.py b/magnet/ize/memory.py index 0a73314..48c9e0d 100644 --- a/magnet/ize/memory.py +++ b/magnet/ize/memory.py @@ -36,7 +36,7 @@ async def on(self, create: bool = False, initialize: bool = False): if initialize: self.db.initialize() - async def index(self, payload, msg, field=None, v=False, instruction="Represent this information for searching relevant passages: "): + async def index(self, payload=None, msg=None, field=None, v=False, instruction="Represent this information for searching relevant passages: "): if not msg or not payload: return _f('fatal', 'no field message and/or payload to ack!') if field: @@ -64,8 +64,10 @@ async def index(self, payload, msg, field=None, v=False, instruction="Represent text=_chunk, document=payload.document ) - _f('info', f'sending payload\n{_chunk}') if v else None + _f('info', f'sending payload\n{_chunk}') await self.field.pulse(payload) + else: + _f('warn', f'embedding exists') if v else None else: embedding = self._model.encode(text_to_encode, normalize_embeddings=True) if not self.is_dupe(q=embedding): @@ -84,7 +86,7 @@ async def index(self, payload, msg, field=None, v=False, instruction="Represent _f('info', f'sending payload\n{payload}') if v else None await self.field.pulse(payload) else: - _f('warn', f'embedding exists\n{payload}') + _f('warn', f'embedding exists') if v else None await msg.ack_sync() except Exception as e: _f('fatal', e) diff --git a/pyproject.toml b/pyproject.toml index d46882b..189488f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "llm_magnet" -version = "0.3.11" +version = "0.3.12" description = "the small distributed language model toolkit. fine-tune state-of-the-art LLMs anywhere, rapidly." readme = "dynamic" diff --git a/setup.py b/setup.py index 8976242..b52d5d8 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='llm_magnet', - version='0.3.11', + version='0.3.12', description="the small distributed language model toolkit. fine-tune state-of-the-art LLMs anywhere, rapidly.", long_description=open('README.md').read(), long_description_content_type='text/markdown',