Skip to content

feat: add response_format param to OllamaChatGenerator #1282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a8fa887
Add response_format param to ollama generator
Amnah199 Jan 9, 2025
3197987
Update requirements
Amnah199 Jan 9, 2025
f26e7c9
small fix
Amnah199 Jan 9, 2025
db1d4b4
Fix an error in chat
Amnah199 Jan 10, 2025
4a0c440
Add test for response_format
Amnah199 Jan 10, 2025
6882183
Small fix
Amnah199 Jan 10, 2025
e82a4be
remove more tests involving serialization of lambdas (#1285)
anakin87 Jan 10, 2025
b0b3d87
fix: PgvectorDocumentStore - use appropriate schema name if dropping …
mabartcz Jan 10, 2025
4eca1d6
Update the changelog
HaystackBot Jan 10, 2025
c81a6c5
fix: Cohere - fix chat message creation (#1289)
anakin87 Jan 15, 2025
a71cc7d
Update the changelog
HaystackBot Jan 15, 2025
701c1b2
chore: Mistral - pin haystack-ai>=2.9.0 and simplify test (#1293)
anakin87 Jan 15, 2025
15714fe
pin haystack-ai>=2.9.0 and simplify (#1292)
anakin87 Jan 15, 2025
0fdb292
Update the changelog
HaystackBot Jan 15, 2025
b021e05
feat: Ollama - add support for tools (#1294)
anakin87 Jan 16, 2025
c2fa61e
Update the changelog
HaystackBot Jan 16, 2025
9fed061
vertex: handle function role removal (#1296)
anakin87 Jan 16, 2025
9e89c01
feat: Add Secret handling in OpenSearchDocumentStore (#1288)
vblagoje Jan 16, 2025
63b2eed
Update the changelog
HaystackBot Jan 16, 2025
61ae02c
Update the changelog
HaystackBot Jan 16, 2025
8908da8
chore: llama.cpp - gently handle the removal of ChatMessage.from_func…
anakin87 Jan 16, 2025
0d02e42
Update the changelog
HaystackBot Jan 16, 2025
d2fc7ed
manually fix changelog (#1299)
anakin87 Jan 16, 2025
38bf2b9
chore: google-ai - gently handle the removal of function role (#1297)
anakin87 Jan 16, 2025
8be0778
Update the changelog
HaystackBot Jan 16, 2025
cf47c2a
chore: inherit from `FilterDocumentsTestWithDataframe` in Document St…
anakin87 Jan 17, 2025
fe4481d
feat: Add LangfuseConnector secure key management and serialization …
vblagoje Jan 17, 2025
06c1088
Update the changelog
HaystackBot Jan 17, 2025
e6f46ef
Anthropic tools + refactoring (#1300)
anakin87 Jan 17, 2025
c18eb24
pin transformers!=4.48.0 (#1302)
anakin87 Jan 20, 2025
0541145
Update the changelog
HaystackBot Jan 20, 2025
8845a5b
fix: Optimum - do not explictly pin `transformers` (#1303)
anakin87 Jan 20, 2025
a71ae4b
Update the changelog
HaystackBot Jan 20, 2025
93f0b33
Update the changelog
HaystackBot Jan 20, 2025
080cfbc
Pinecone - increase sleep time (#1307)
anakin87 Jan 21, 2025
81bb3bf
fix: End langfuse generation spans properly (#1301)
vblagoje Jan 21, 2025
df8674b
feat: LangfuseConnector - add httpx.Client init param (#1308)
vblagoje Jan 21, 2025
eb846b5
Update the changelog
HaystackBot Jan 21, 2025
8ce450d
chore: Bedrock - pin `transformers!=4.48.*` (#1306)
anakin87 Jan 21, 2025
d6a7c6e
Update the changelog
HaystackBot Jan 21, 2025
d28501d
feat(AWS Bedrock): Add Cohere Reranker (#1291)
lambda-science Jan 23, 2025
a4a8b5c
feat!: Google AI - support for Tool + general refactoring (#1316)
anakin87 Jan 23, 2025
87b5b92
Update the changelog
HaystackBot Jan 23, 2025
27b2139
refactor: GoogleAIGeminiGenerator - make some attributes public (#1317)
sjrl Jan 23, 2025
e6c4303
Update the changelog
HaystackBot Jan 23, 2025
3655ded
feat: AmazonBedrockChatGenerator - add tools support (#1304)
vblagoje Jan 23, 2025
ddf084b
refactor!: AmazonBedrockGenerator - remove truncation (#1314)
vblagoje Jan 23, 2025
76e8948
Update the changelog
HaystackBot Jan 23, 2025
d9eda49
fix changelog (#1319)
anakin87 Jan 23, 2025
d08b55d
docs: updating `amazon-bedrock` README, should also contain, Embedder…
davidsbatista Jan 23, 2025
3b4060e
chore(deps): bump fossas/fossa-action from 1.4.0 to 1.5.0 (#1322)
dependabot[bot] Jan 24, 2025
0a7251d
Merge with main
Amnah199 Jan 28, 2025
8a52023
Add test for response_format
Amnah199 Jan 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI_license_compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

# We keep the license inventory on FOSSA
- name: Send license report to Fossa
uses: fossas/fossa-action@v1.4.0
uses: fossas/fossa-action@v1.5.0
continue-on-error: true # not critical
with:
api-key: ${{ secrets.FOSSA_LICENSE_SCAN_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ollama.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
LLM_FOR_TESTS: "orca-mini"
LLM_FOR_TESTS: "llama3.2:3b"
EMBEDDER_FOR_TESTS: "nomic-embed-text"

jobs:
Expand Down
62 changes: 31 additions & 31 deletions README.md

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions integrations/amazon_bedrock/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## [integrations/amazon_bedrock-v3.0.0] - 2025-01-23

### 🚀 Features

- *(AWS Bedrock)* Add Cohere Reranker (#1291)
- AmazonBedrockChatGenerator - add tools support (#1304)

### 🚜 Refactor

- [**breaking**] AmazonBedrockGenerator - remove truncation (#1314)


## [integrations/amazon_bedrock-v2.1.3] - 2025-01-21

### 🧹 Chores

- Bedrock - pin `transformers!=4.48.*` (#1306)


## [integrations/amazon_bedrock-v2.1.2] - 2025-01-20

### 🌀 Miscellaneous

- Fix: Bedrock - pin `transformers!=4.48.0` (#1302)

## [integrations/amazon_bedrock-v2.1.1] - 2024-12-18

### 🐛 Bug Fixes
Expand Down
32 changes: 32 additions & 0 deletions integrations/amazon_bedrock/examples/bedrock_ranker_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import os

from haystack import Document
from haystack.utils import Secret

from haystack_integrations.components.rankers.amazon_bedrock import BedrockRanker

# Set up AWS credentials
# You can also set these as environment variables
aws_profile_name = os.environ.get("AWS_PROFILE") or "default"
aws_region_name = os.environ.get("AWS_DEFAULT_REGION") or "eu-central-1"
# Initialize the BedrockRanker with AWS credentials
ranker = BedrockRanker(
model="cohere.rerank-v3-5:0",
top_k=2,
aws_profile_name=Secret.from_token(aws_profile_name),
aws_region_name=Secret.from_token(aws_region_name),
)

# Create some sample documents
docs = [
Document(content="Paris is the capital of France."),
Document(content="Berlin is the capital of Germany."),
Document(content="London is the capital of the United Kingdom."),
Document(content="Rome is the capital of Italy."),
]

# Define a query
query = "What is the capital of Germany?"

# Run the ranker
output = ranker.run(query=query, documents=docs)
7 changes: 4 additions & 3 deletions integrations/amazon_bedrock/pydoc/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ loaders:
- type: haystack_pydoc_tools.loaders.CustomPythonLoader
search_path: [../src]
modules: [
"haystack_integrations.common.amazon_bedrock.errors",
"haystack_integrations.components.embedders.amazon_bedrock.document_embedder",
"haystack_integrations.components.embedders.amazon_bedrock.text_embedder",
"haystack_integrations.components.generators.amazon_bedrock.generator",
"haystack_integrations.components.generators.amazon_bedrock.adapters",
"haystack_integrations.common.amazon_bedrock.errors",
"haystack_integrations.components.generators.amazon_bedrock.handlers",
"haystack_integrations.components.generators.amazon_bedrock.chat.chat_generator",
"haystack_integrations.components.embedders.amazon_bedrock.text_embedder",
"haystack_integrations.components.embedders.amazon_bedrock.document_embedder",
"haystack_integrations.components.rankers.amazon_bedrock.ranker",
]
ignore_when_discovered: ["__init__"]
processors:
Expand Down
4 changes: 2 additions & 2 deletions integrations/amazon_bedrock/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = ["haystack-ai", "boto3>=1.28.57", "transformers"]
dependencies = ["haystack-ai", "boto3>=1.28.57"]

[project.urls]
Documentation = "https://github.com/deepset-ai/haystack-core-integrations/tree/main/integrations/amazon_bedrock#readme"
Expand All @@ -48,6 +48,7 @@ dependencies = [
"pytest",
"pytest-rerunfailures",
"haystack-pydoc-tools",
"jsonschema",
]
[tool.hatch.envs.default.scripts]
test = "pytest {args:tests}"
Expand Down Expand Up @@ -155,7 +156,6 @@ exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:"]
[[tool.mypy.overrides]]
module = [
"botocore.*",
"transformers.*",
"boto3.*",
"haystack.*",
"haystack_integrations.*",
Expand Down
Loading
Loading