Skip to content

Commit

Permalink
chore(release): release version 0.9.0 (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
baxen authored Sep 10, 2024
1 parent 5a3da33 commit c4365bf
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Enforcing Conventional Commits in PR titles to maintain consistency and clarity.
## [0.9.0] - 2024-09-09

- chore: add just command for releases and update pyproject for changelog (#43)
- feat: convert ollama provider to an openai configuration (#34)
- fix: Bedrock Provider request (#29)
- test: Update truncate and summarize tests to check for sytem prompt t… (#42)
- chore: update test_tools to read a file instead of get a password (#38)
- fix: Use placeholder message to check tokens (#41)
- feat: rewind to user message (#30)
- chore: Update LICENSE (#40)
- fix: shouldn't hardcode truncate to gpt4o mini (#35)
- ci: enforce PR title follows conventional commit (#6)
- chore: Apply ruff and add to CI (#27)

## [0.8.4] - 2024-09-02

Expand Down
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ integration *FLAGS:
uv run pytest tests -m integration {{FLAGS}}

format:
ruff check --fix && ruff format
uvx ruff check --fix && uvx ruff format

coverage *FLAGS:
uv run coverage run -m pytest tests -m "not integration" {{FLAGS}}
Expand All @@ -21,12 +21,12 @@ coverage *FLAGS:
release version:
uvx --from=toml-cli toml set --toml-path=pyproject.toml project.version {{version}}
git co -b release-version-{{version}}
git add .
git add pyproject.toml
git commit -m "chore(release): release version {{version}}"

tag:
current_version=`grep 'version' pyproject.toml | cut -d '"' -f 2`
tag_name="v${version}"
tag_name="v${current_version}"
git tag ${tag_name}

# this will kick of ci for release
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ai-exchange"
version = "0.8.4"
version = "0.9.0"
description = "a uniform python SDK for message generation with LLMs"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
3 changes: 3 additions & 0 deletions src/exchange/providers/ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ def from_env(cls: Type["OllamaProvider"]) -> "OllamaProvider":
base_url=url,
timeout=httpx.Timeout(60 * 10),
)
# from_env is expected to fail if provider is not available
# so we run a quick test that the endpoint is running
client.get("")
return cls(client)
10 changes: 3 additions & 7 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,8 @@ def read_file(filename: str) -> str:
Returns:
str: The contents of the file.
"""
with open(filename, "r") as file:
return file.read()

# Create a temporary file with the contents "hello exchange"
temp_file = tmp_path / "temp_file.txt"
temp_file.write_text("hello exchange")
assert filename == "test.txt"
return "hello exchange"

ex = Exchange(
provider=provider,
Expand All @@ -65,7 +61,7 @@ def read_file(filename: str) -> str:
tools=(Tool.from_function(read_file),),
)

ex.add(Message.user(f"What are the contents of this file? {temp_file}"))
ex.add(Message.user("What are the contents of this file? test.txt"))

response = ex.reply()

Expand Down

0 comments on commit c4365bf

Please sign in to comment.