text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>thinking.supported is False
assert model_info.capabilities.thinking.types.enabled.supported is False
assert model_info.capabilities.thinking.types.adaptive.supported is False
assert model_info.capabilities.image_input.supported is False
assert model_info.capabilities.citations.supported is... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>from pathlib import Path
from fastapi.testclient import TestClient
from private_gpt.chat.extensions.context_filter import ContextFilter
from private_gpt.server.primitives.primitives_service import (
SearchResponse,
SemanticSearch,
)
from tests.fixtures.ingest_helper import IngestHelper
def tes... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|> == 404
def test_skill_version_get_not_found(
test_client: TestClient, injector: MockInjector
) -> None:
collection = _collection()
assert (
test_client.get(
"/v1/skills/nonexistent/versions/v1", params={"collection": collection}
).status_code
== 404
)... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>"""Unit tests for skills_files.py wrapper directory handling."""
from private_gpt.server.skills.skills_files import _flatten_wrapper_directory
def _create_zip_entries(files: dict[str, bytes]) -> list[tuple[str, bytes]]:
"""Helper to create fake zip entries from a dict."""
return list(files.ite... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>from fastapi.testclient import TestClient
def test_ui_path_still_serves_bundled_ui_index(test_client: TestClient) -> None:
respon<|fim_suffix|>test_client: TestClient,
) -> None:
response = test_client.get("/ui", follow_redirects=False)
assert response.status_code == 307
assert response... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|>efault_does_not_require_auth(test_client: TestClient) -> None:
response_before = test_client.get("/v1/artifacts/list?collection=default")
assert response_before.status_code == 200
<|fim_prefix|>from fastapi.testclient import TestClient
<|fim_middle|>def test_d<|endoftext|> | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>from private_gpt.utils.dep<|fim_suffix|>: "
"`uv sync --inexact --extra database-postgres` or "
"`uv sync --inexact --extra database`."
)
def test_format_missing_dependency_message_can_disable_inexact_sync() -> None:
message = format_missing_dependency_message(
"MCP tools... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>from typing import Any
import pytest
from fastapi.testclient import TestClient
from private_gpt.settings.settings import settings
def _get_openapi_spec(test_client: TestClient) -> dict[str, Any]:
prefix_path = settings().server.root_path
response = test_client.get(f"{prefix_path}/openapi.json"... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>"""Tests to validate that the simple authentication mechanism is working.
NOTE: We are not testing t<|fim_suffix|>es = {}
def test_default_auth_working_when_enabled_401(test_client: TestClient) -> None:
response = test_client.get("/v1/artifacts/list?collection=default")
assert response.status_c... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|>})
mocked_settings = injector.get(Settings)
assert mocked_settings.server.env_name == "overriden"
<|fim_prefix|>from private_gpt.settings.settings import Settings, settings
from tests.fixtures.mock_injector import MockI<|fim_middle|>njector
def test_settings_are_loaded_and_merged() -> None:
... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>import io
import os
import pytest
from private_gpt.settings.settings_loader import discover_models_from_environment
from private_gpt.settings.yaml import load_yaml_with_envvars
def test_environment_variables_are_loaded() -> None:
sample_yaml = """
replaced: ${TEST_REPLACE_ME}
"""
env =... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|> producer.process_content_blocks(block_generator())
# Collect events
events = []
while not manager._queue.empty():
events.append(manager._queue.get_nowait())
assert len(events) == 3
assert all(isinstance(e, RawContentBlockDeltaEvent) for e in events)
assert events[0].de... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|>t_block, block_type)
)
== 1
)
@pytest.mark.asyncio
async def test_unit_orphaned_stop_filtered_when_start_stripped() -> None:
"""ContentBlockStop whose start was stripped must not appear in output."""
tldr_bid, text_bid = _block_id(), _block_id()
async def gen... | fim | zylon-ai/private-gpt | python |
<|fim_suffix|>anager
from private_gpt.events.sse.sse_producer import SSEProducer
if TYPE_CHECKING:
from private_gpt.events.models import Event
@pytest.fixture
def manager() -> SSEStreamManager:
return SSEStreamManager()
@pytest.fixture
def producer(manager: SSEStreamManager) -> SSEProducer:
return SSEP... | fim | zylon-ai/private-gpt | python |
<|fim_prefix|>import asyncio
import threading
from typing import Any
from private_gpt.components.node_store.node_store_component import NodeStoreComponent
from private_gpt.components.vector_store.vector_store_component import (
VectorStoreComponent,
)
from private_gpt.di import (
clean_global_injector,
get... | fim | zylon-ai/private-gpt | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.