Skip to content

Commit

Permalink
v0.12.19 (#17848)
Browse files Browse the repository at this point in the history
  • Loading branch information
logan-markewich authored Feb 18, 2025
1 parent 8d8c823 commit c80992f
Show file tree
Hide file tree
Showing 9 changed files with 1,132 additions and 87 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# ChangeLog

## [2025-02-17]

### `llama-index-core` [0.12.19]

- Added sync/async Function tool callback (#16637)
- Tweaked regex for template vars

### `llama-index-experimental` [0.5.4]

- Experimental natural language retrievers using duck db (#15642)

### `llama-index-graph-stores-memgraph` [0.3.0]

- fix version on memgraph (#17842)

### `llama-index-indices-managed-llama-cloud` [0.6.7]

- Image Metadata Test + Sync Implementation (#17844)

### `llama-index-postprocessor-nvidia-rerank` [0.4.2]

- NVIDIARerank add http_client parameter to pass custom clients (#17832)

### `llama-index-llms-mistralai` [0.3.3]

- mistral saba support (#17847)

## [2025-02-16]

### `llama-index-core` [0.12.18]
Expand Down
27 changes: 27 additions & 0 deletions docs/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# ChangeLog

## [2025-02-17]

### `llama-index-core` [0.12.19]

- Added sync/async Function tool callback (#16637)
- Tweaked regex for template vars

### `llama-index-experimental` [0.5.4]

- Experimental natural language retrievers using duck db (#15642)

### `llama-index-graph-stores-memgraph` [0.3.0]

- fix version on memgraph (#17842)

### `llama-index-indices-managed-llama-cloud` [0.6.7]

- Image Metadata Test + Sync Implementation (#17844)

### `llama-index-postprocessor-nvidia-rerank` [0.4.2]

- NVIDIARerank add http_client parameter to pass custom clients (#17832)

### `llama-index-llms-mistralai` [0.3.3]

- mistral saba support (#17847)

## [2025-02-16]

### `llama-index-core` [0.12.18]
Expand Down
1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ nav:
- ./examples/tools/azure_code_interpreter.ipynb
- ./examples/tools/cassandra.ipynb
- ./examples/tools/eval_query_engine_tool.ipynb
- ./examples/tools/function_tool_callback.ipynb
- Transforms:
- ./examples/transforms/TransformsEval.ipynb
- Use Cases:
Expand Down
2 changes: 1 addition & 1 deletion llama-index-core/llama_index/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Init file of LlamaIndex."""

__version__ = "0.12.18"
__version__ = "0.12.19"

import logging
from logging import NullHandler
Expand Down
4 changes: 3 additions & 1 deletion llama-index-core/llama_index/core/prompts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def format(self, format_string: str) -> str:
return re.sub(r"\{([^{}]+)\}", self._replace_match, format_string)

def parse(self, format_string: str) -> List[str]:
return re.findall(r"\{([^{}]+)\}", format_string)
return re.findall(
r"\{([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}", format_string
)

def _replace_match(self, match: re.Match) -> str:
key = match.group(1)
Expand Down
2 changes: 1 addition & 1 deletion llama-index-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ name = "llama-index-core"
packages = [{include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.12.18"
version = "0.12.19"

[tool.poetry.dependencies]
SQLAlchemy = {extras = ["asyncio"], version = ">=1.4.49"}
Expand Down
22 changes: 22 additions & 0 deletions llama-index-core/tests/prompts/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,3 +292,25 @@ def test_template_with_json() -> None:

test_case_3 = PromptTemplate("test {{message}} {{test}}")
assert test_case_3.format(message="message", test="test") == "test {message} {test}"


def test_template_has_json() -> None:
"""Test partial format."""
prompt_txt = (
'hello {text} {foo} \noutput format:\n```json\n{"name": "llamaindex"}\n```'
)
except_prompt = (
'hello world bar \noutput format:\n```json\n{"name": "llamaindex"}\n```'
)

prompt_template = PromptTemplate(prompt_txt)
template_vars = prompt_template.template_vars
prompt_fmt = prompt_template.partial_format(foo="bar")
prompt = prompt_fmt.format(text="world")

assert isinstance(prompt_fmt, PromptTemplate)
assert template_vars == ["text", "foo"]
assert prompt == except_prompt
assert prompt_fmt.format_messages(text="world") == [
ChatMessage(content=except_prompt, role=MessageRole.USER)
]
1,130 changes: 1,048 additions & 82 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ name = "llama-index"
packages = [{from = "_llama-index", include = "llama_index"}]
readme = "README.md"
repository = "https://github.com/run-llama/llama_index"
version = "0.12.18"
version = "0.12.19"

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
Expand All @@ -57,7 +57,7 @@ llama-index-agent-openai = "^0.4.0"
llama-index-readers-file = "^0.4.0"
llama-index-readers-llama-parse = ">=0.4.0"
llama-index-indices-managed-llama-cloud = ">=0.4.0"
llama-index-core = "^0.12.18"
llama-index-core = "^0.12.19"
llama-index-multi-modal-llms-openai = "^0.4.0"
llama-index-cli = "^0.4.0"
nltk = ">3.8.1" # avoids a CVE, temp until next release, should be in llama-index-core
Expand Down

0 comments on commit c80992f

Please sign in to comment.