diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/README.md b/llama-index-integrations/llms/llama-index-llms-mistral-rs/README.md index 9f0aebac785a84..deb5bb75384d2f 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/README.md +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/README.md @@ -1,3 +1,3 @@ # LlamaIndex Llms Integration: Mistral-Rs -Please install the Python bindings according to the guide [here](https://github.com/EricLBuehler/mistral.rs/blob/master/mistralrs-pyo3/README.md). \ No newline at end of file +Please install the Python bindings according to the guide [here](https://github.com/EricLBuehler/mistral.rs/blob/master/mistralrs-pyo3/README.md). diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/plain.ipynb b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/plain.ipynb index f238a8a2cf8631..0cf859364ae438 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/plain.ipynb +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/plain.ipynb @@ -15,7 +15,7 @@ "documents = SimpleDirectoryReader(\"data\").load_data()\n", "\n", "# bge embedding model\n", - "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")\n" + "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")" ] }, { @@ -55,7 +55,7 @@ "source": [ "query_engine = index.as_query_engine()\n", "response = query_engine.query(\"How do I pronounce graphene?\")\n", - "print(response)\n" + "print(response)" ] } ], diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/streaming.ipynb b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/streaming.ipynb index c9daf850693736..6bcfe155db049e 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/streaming.ipynb +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/streaming.ipynb @@ -15,7 +15,7 @@ "documents = SimpleDirectoryReader(\"data\").load_data()\n", "\n", "# bge embedding model\n", - "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")\n" + "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")" ] }, { @@ -24,7 +24,6 @@ "metadata": {}, "outputs": [], "source": [ - "\n", "Settings.llm = MistralRS(\n", " which=Which.GGUF(\n", " tok_model_id=\"mistralai/Mistral-7B-Instruct-v0.1\",\n", @@ -58,7 +57,7 @@ "query_engine = index.as_query_engine(streaming=True)\n", "response = query_engine.query(\"What are non-granular scalings?\")\n", "for text in response.response_gen:\n", - " print(text,end=\"\")\n", + " print(text, end=\"\")\n", " sys.stdout.flush()" ] } diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/xlora_gguf.ipynb b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/xlora_gguf.ipynb index f5e6f804ac282f..98dc78a41e652c 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/xlora_gguf.ipynb +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/examples/xlora_gguf.ipynb @@ -15,7 +15,7 @@ "documents = SimpleDirectoryReader(\"data\").load_data()\n", "\n", "# bge embedding model\n", - "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")\n" + "Settings.embed_model = resolve_embed_model(\"local:BAAI/bge-small-en-v1.5\")" ] }, { @@ -24,7 +24,6 @@ "metadata": {}, "outputs": [], "source": [ - "\n", "Settings.llm = MistralRS(\n", " which=Which.GGUF(\n", " tok_model_id=\"mistralai/Mistral-7B-Instruct-v0.1\",\n", @@ -57,7 +56,7 @@ "source": [ "query_engine = index.as_query_engine()\n", "response = query_engine.query(\"How do I pronounce graphene?\")\n", - "print(response)\n" + "print(response)" ] } ], diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/llama_index/llms/mistral_rs/base.py b/llama-index-integrations/llms/llama-index-llms-mistral-rs/llama_index/llms/mistral_rs/base.py index b895af643d746b..8624d088fa442e 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/llama_index/llms/mistral_rs/base.py +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/llama_index/llms/mistral_rs/base.py @@ -18,9 +18,6 @@ ) from llama_index.core.llms.callbacks import llm_chat_callback, llm_completion_callback from llama_index.core.llms.custom import CustomLLM -from llama_index.core.base.llms.generic_utils import ( - completion_response_to_chat_response, -) from llama_index.core.types import BaseOutputParser, PydanticProgramMode from mistralrs import ( diff --git a/llama-index-integrations/llms/llama-index-llms-mistral-rs/pyproject.toml b/llama-index-integrations/llms/llama-index-llms-mistral-rs/pyproject.toml index 0dba6bdbcf2a23..cf3eebcd1b5bc7 100644 --- a/llama-index-integrations/llms/llama-index-llms-mistral-rs/pyproject.toml +++ b/llama-index-integrations/llms/llama-index-llms-mistral-rs/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" +requires = ["poetry-core"] [tool.codespell] check-filenames = true @@ -24,13 +24,13 @@ ignore_missing_imports = true python_version = "3.8" [tool.poetry] -name = "llama-index-llms-mistral-rs" -version = "0.1.0" -description = "llama-index llms mistral-rs integration" authors = ["EricLBuehler"] +description = "llama-index llms mistral-rs integration" license = "MIT" -readme = "README.md" +name = "llama-index-llms-mistral-rs" packages = [{include = "llama_index/"}] +readme = "README.md" +version = "0.1.0" [tool.poetry.dependencies] python = ">=3.8.1,<4.0" @@ -52,5 +52,5 @@ types-Deprecated = ">=0.1.0" types-PyYAML = "^6.0.12.12" types-protobuf = "^4.24.0.4" types-redis = "4.5.5.0" -types-requests = "2.28.11.8" # TODO: unpin when mypy>0.991 +types-requests = "2.28.11.8" # TODO: unpin when mypy>0.991 types-setuptools = "67.1.0.0"