Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into 323-issue-instruction…
Browse files Browse the repository at this point in the history
…s-on-using-deepseek-v3-and-genimi-20-in-ag2
  • Loading branch information
harishmohanraj committed Jan 20, 2025
2 parents 574785d + 25fbc1b commit 97f83ae
Show file tree
Hide file tree
Showing 473 changed files with 724 additions and 32,571 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/contrib-graph-rag-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
paths:
- "autogen/agentchat/contrib/graph_rag/**"
- "test/agentchat/contrib/graph_rag/**"
- ".github/workflows/contrib-tests.yml"
- ".github/workflows/contrib-test.yml"
- "pyproject.toml"

concurrency:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/contrib-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- "test/agentchat/contrib/**"
- "test/test_browser_utils.py"
- "test/test_retrieve_utils.py"
- ".github/workflows/contrib-tests.yml"
- ".github/workflows/contrib-test.yml"
- "pyproject.toml"

concurrency:
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
Expand Down
233 changes: 0 additions & 233 deletions .github/workflows/dotnet-build.yml

This file was deleted.

77 changes: 0 additions & 77 deletions .github/workflows/dotnet-release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Build](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml/badge.svg)](https://github.com/ag2ai/ag2/actions/workflows/python-package.yml)
![Python Version](https://img.shields.io/badge/3.9%20%7C%203.10%20%7C%203.11%20%7C%203.12-blue)
[![Discord](https://img.shields.io/discord/1153072414184452236?logo=discord&style=flat)](https://discord.gg/pAbnFJrkgZ)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/ag2ai)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40ag2ai)](https://x.com/Chi_Wang_)

<!-- [![NuGet version](https://badge.fury.io/nu/AutoGen.Core.svg)](https://badge.fury.io/nu/AutoGen.Core) -->

Expand Down
15 changes: 5 additions & 10 deletions autogen/agentchat/contrib/capabilities/text_compressors.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
#
# Portions derived from https://github.com/microsoft/autogen are under the MIT License.
# SPDX-License-Identifier: MIT
from typing import Any, Optional, Protocol
from typing import Any, Protocol

IMPORT_ERROR: Optional[Exception] = None
try:
from ....import_utils import optional_import_block, require_optional_import

with optional_import_block() as result:
import llmlingua
except ImportError:
IMPORT_ERROR = ImportError("LLMLingua is not installed. Please install it with `pip install autogen[long-context]`")
PromptCompressor = object
else:
from llmlingua import PromptCompressor


Expand All @@ -27,6 +24,7 @@ def compress_text(self, text: str, **compression_params) -> dict[str, Any]:
...


@require_optional_import("llmlingua", "long-context")
class LLMLingua:
"""Compresses text messages using LLMLingua for improved efficiency in processing and response generation.
Expand Down Expand Up @@ -55,9 +53,6 @@ def __init__(
Raises:
ImportError: If the llmlingua library is not installed.
"""
if IMPORT_ERROR:
raise IMPORT_ERROR

self._prompt_compressor = PromptCompressor(**prompt_compressor_kwargs)

assert isinstance(self._prompt_compressor, llmlingua.PromptCompressor)
Expand Down
Loading

0 comments on commit 97f83ae

Please sign in to comment.