Skip to content

Commit

Permalink
Only format the new files
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler committed Apr 25, 2024
1 parent 3cd1ec3 commit b6672dd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 18 deletions.
@@ -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).
Please install the Python bindings according to the guide [here](https://github.com/EricLBuehler/mistral.rs/blob/master/mistralrs-pyo3/README.md).
Expand Up @@ -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\")"
]
},
{
Expand Down Expand Up @@ -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)"
]
}
],
Expand Down
Expand Up @@ -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\")"
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -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()"
]
}
Expand Down
Expand Up @@ -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\")"
]
},
{
Expand All @@ -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",
Expand Down Expand Up @@ -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)"
]
}
],
Expand Down
Expand Up @@ -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 (
Expand Down
@@ -1,6 +1,6 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]

[tool.codespell]
check-filenames = true
Expand All @@ -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"
Expand All @@ -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"

0 comments on commit b6672dd

Please sign in to comment.