mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-19 03:42:22 -06:00
chore: Fixes test_fast_api.py (part I for circular deps).
It still fails due to signal used not in main thread. It will be fixed later. PiperOrigin-RevId: 760050504
This commit is contained in:
committed by
Copybara-Service
parent
f592de4cc0
commit
9324801b75
@@ -12,23 +12,29 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections import OrderedDict
|
||||
import json
|
||||
import os
|
||||
import tempfile
|
||||
from typing import Optional
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from google.genai import types
|
||||
from typing_extensions import override
|
||||
from vertexai.preview import rag
|
||||
|
||||
from ..events.event import Event
|
||||
from ..sessions.session import Session
|
||||
from . import _utils
|
||||
from .base_memory_service import BaseMemoryService
|
||||
from .base_memory_service import SearchMemoryResponse
|
||||
from .memory_entry import MemoryEntry
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from ..events.event import Event
|
||||
from ..sessions.session import Session
|
||||
|
||||
|
||||
class VertexAiRagMemoryService(BaseMemoryService):
|
||||
"""A memory service that uses Vertex AI RAG for storage and retrieval."""
|
||||
@@ -103,6 +109,8 @@ class VertexAiRagMemoryService(BaseMemoryService):
|
||||
self, *, app_name: str, user_id: str, query: str
|
||||
) -> SearchMemoryResponse:
|
||||
"""Searches for sessions that match the query using rag.retrieval_query."""
|
||||
from ..events.event import Event
|
||||
|
||||
response = rag.retrieval_query(
|
||||
text=query,
|
||||
rag_resources=self._vertex_rag_store.rag_resources,
|
||||
|
||||
Reference in New Issue
Block a user