id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
323,700 | enoch85/ovms-home-assistant | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/rate_limiter.py | ovms.rate_limiter.CommandRateLimiter | import time
from typing import List
class CommandRateLimiter:
"""Rate limiter for OVMS commands.
Prevents sending too many commands in a short period to avoid overwhelming the OVMS module.
"""
def __init__(self, max_calls: int=5, period: float=60.0):
"""Initialize the rate limiter.
A... |
class CommandRateLimiter:
'''Rate limiter for OVMS commands.
Prevents sending too many commands in a short period to avoid overwhelming the OVMS module.
'''
def __init__(self, max_calls: int=5, period: float=60.0):
'''Initialize the rate limiter.
Args:
max_calls: Maximum nu... | 5 | 5 | 14 | 3 | 5 | 6 | 2 | 1.18 | 0 | 3 | 0 | 0 | 4 | 3 | 4 | 4 | 64 | 16 | 22 | 12 | 17 | 26 | 22 | 12 | 17 | 2 | 0 | 1 | 6 |
323,701 | enoch85/ovms-home-assistant | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/sensor/binary_sensor.py | ovms.sensor.binary_sensor.OVMSBinarySensor | from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.device_registry import DeviceInfo
from ..const import LOGGER_NAME, SIGNAL_ADD_ENTITIES, SIGNAL_UPDATE_ENTITY, truncate_state_value
from ..metrics import METRIC_DEFINITIONS, TOPIC_PATTERNS, BINARY_METRICS, get_metric_by_path... |
class OVMSBinarySensor(BinarySensorEntity, RestoreEntity):
'''Representation of an OVMS binary sensor.'''
def __init__(self, unique_id: str, name: str, topic: str, initial_state: str, device_info: DeviceInfo, attributes: Dict[str, Any], hass: Optional[HomeAssistant]=None, friendly_name: Optional[str]=None) ->... | 11 | 10 | 28 | 3 | 20 | 5 | 5 | 0.24 | 2 | 10 | 0 | 0 | 8 | 11 | 8 | 8 | 246 | 35 | 171 | 57 | 150 | 41 | 137 | 36 | 127 | 10 | 1 | 4 | 49 |
323,702 | enoch85/ovms-home-assistant | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/sensor/entities.py | ovms.sensor.entities.CellVoltageSensor | from ..const import LOGGER_NAME, SIGNAL_ADD_ENTITIES, SIGNAL_UPDATE_ENTITY, truncate_state_value
from .parsers import parse_value, process_json_payload, requires_numeric_value, is_special_state_value, calculate_median
from homeassistant.components.sensor import SensorEntity, SensorStateClass, SensorDeviceClass
from hom... |
class CellVoltageSensor(SensorEntity, RestoreEntity):
'''Representation of a cell voltage sensor.'''
def __init__(self, unique_id: str, name: str, topic: str, initial_state: Any, device_info: DeviceInfo, attributes: Dict[str, Any], friendly_name: Optional[str]=None, hass: Optional[HomeAssistant]=None):
... | 5 | 4 | 67 | 7 | 50 | 11 | 8 | 0.22 | 2 | 7 | 0 | 0 | 2 | 15 | 2 | 2 | 181 | 20 | 133 | 38 | 118 | 29 | 84 | 26 | 80 | 13 | 1 | 7 | 25 |
323,703 | enoch85/ovms-home-assistant | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/sensor/entities.py | ovms.sensor.entities.OVMSSensor | from homeassistant.components.sensor import SensorEntity, SensorStateClass, SensorDeviceClass
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.dispatcher import async_dispatcher_connect, async_dispatcher_send
from homeassistant.helpers.entity import async_generate_entity_id
from h... |
class OVMSSensor(SensorEntity, RestoreEntity):
'''Representation of an OVMS sensor.'''
def _is_tire_sensor(self) -> bool:
'''Check if this sensor is a tire-related sensor by topic pattern.'''
pass
def __init__(self, unique_id: str, name: str, topic: str, initial_state: str, device_info: D... | 9 | 8 | 55 | 7 | 39 | 10 | 8 | 0.26 | 2 | 9 | 0 | 0 | 6 | 20 | 6 | 6 | 362 | 48 | 253 | 67 | 234 | 66 | 163 | 54 | 155 | 16 | 1 | 7 | 56 |
323,704 | enoch85/ovms-home-assistant | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/enoch85_ovms-home-assistant/custom_components/ovms/sensor/switch.py | ovms.sensor.switch.OVMSSwitch | from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.const import EntityCategory
from homeassistant.helpers.entity import async_generate_entity_id
from ..const import DOMAIN, LOGGER_NAME, SIGNAL_ADD_ENTITIES, SIGNAL_UPDATE_ENTITY, truncate_state_value
from homeassistant.core import H... |
class OVMSSwitch(SwitchEntity, RestoreEntity):
'''Representation of an OVMS switch.'''
def __init__(self, unique_id: str, name: str, topic: str, initial_state: str, device_info: DeviceInfo, attributes: Dict[str, Any], command_function: Callable, hass: Optional[HomeAssistant]=None, friendly_name: Optional[str]... | 11 | 10 | 31 | 5 | 21 | 6 | 6 | 0.28 | 2 | 11 | 0 | 0 | 8 | 12 | 8 | 8 | 272 | 46 | 178 | 59 | 156 | 49 | 136 | 46 | 126 | 13 | 1 | 4 | 54 |
323,705 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/__init__.py | polleninformation.PollenInformationDataUpdateCoordinator | from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
from .api import async_get_pollenat_data
from homeassistant.core import HomeAssistant
from datetime import datetime, timedelta
from .const import CONF_APIKEY, CONF_COUNTRY, CONF_LANG, CONF_LATITUDE, CONF_LONGITUDE, DEFAULT_APIKEY, ... |
class PollenInformationDataUpdateCoordinator(DataUpdateCoordinator):
'''Coordinator to fetch data from polleninformation.at.'''
def __init__(self, hass: HomeAssistant, lat, lon, country, lang, apikey):
'''Initialize the data coordinator with API parameters.'''
pass
async def _async_update... | 3 | 3 | 18 | 0 | 17 | 2 | 3 | 0.11 | 1 | 4 | 0 | 0 | 2 | 6 | 2 | 2 | 40 | 2 | 35 | 11 | 32 | 4 | 21 | 10 | 18 | 4 | 1 | 2 | 5 |
323,706 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/config_flow.py | polleninformation.config_flow.PolleninformationConfigFlow | from homeassistant import config_entries
from homeassistant.helpers.selector import LocationSelector, LocationSelectorConfig
from .options_flow import OptionsFlowHandler
from .api import async_get_pollenat_data
import voluptuous as vol
from .utils import async_get_country_code_from_latlon, async_get_country_options, as... |
class PolleninformationConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
'''Config flow for polleninformation.at integration.'''
async def async_step_user(self, user_input=None):
'''Initial step for config flow. User selects country, coordinates via map, language, API key, and location name.'''
pa... | 5 | 3 | 113 | 8 | 98 | 8 | 11 | 0.09 | 2 | 3 | 1 | 0 | 1 | 0 | 2 | 2 | 234 | 18 | 199 | 38 | 194 | 17 | 82 | 37 | 79 | 21 | 1 | 4 | 22 |
323,707 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/options_flow.py | polleninformation.options_flow.OptionsFlowHandler | from .const import DEFAULT_LANG
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.helpers.selector import LocationSelector, LocationSelectorConfig
from .utils import async_get_country_options, async_get_language_options
class OptionsFlowHandler(config_entries.OptionsFlowWithConfigEnt... |
class OptionsFlowHandler(config_entries.OptionsFlowWithConfigEntry):
'''Options flow handler for polleninformation.at integration.'''
def __init__(self, config_entry):
pass
async def async_step_init(self, user_input=None):
'''Initial step for options flow.'''
pass | 3 | 2 | 69 | 4 | 63 | 3 | 9 | 0.05 | 1 | 3 | 0 | 0 | 2 | 0 | 2 | 2 | 142 | 10 | 126 | 32 | 123 | 6 | 60 | 32 | 57 | 16 | 1 | 2 | 17 |
323,708 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/sensor.py | polleninformation.sensor.AllergyRiskHourlySensor | from homeassistant.helpers.update_coordinator import CoordinatorEntity
from homeassistant.components.sensor import SensorEntity
from .const import DEFAULT_LANG, DOMAIN
from datetime import datetime, timedelta, timezone
class AllergyRiskHourlySensor(CoordinatorEntity, SensorEntity):
"""Sensor for hourly allergy ris... |
class AllergyRiskHourlySensor(CoordinatorEntity, SensorEntity):
'''Sensor for hourly allergy risk (one sensor, with forecast).'''
def __init__(self, coordinator, allergyrisk_hourly, levels_current, location_slug, location_title):
pass
@property
def unique_id(self):
pass
@property
... | 11 | 4 | 14 | 0 | 13 | 0 | 2 | 0.04 | 1 | 5 | 0 | 0 | 6 | 9 | 6 | 6 | 96 | 8 | 85 | 45 | 67 | 3 | 43 | 34 | 36 | 7 | 1 | 2 | 14 |
323,709 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/sensor.py | polleninformation.sensor.AllergyRiskSensor | from homeassistant.components.sensor import SensorEntity
from .const import DEFAULT_LANG, DOMAIN
from datetime import datetime, timedelta, timezone
from homeassistant.helpers.update_coordinator import CoordinatorEntity
class AllergyRiskSensor(CoordinatorEntity, SensorEntity):
"""Sensor for daily allergy risk (one ... |
class AllergyRiskSensor(CoordinatorEntity, SensorEntity):
'''Sensor for daily allergy risk (one sensor, with forecast).'''
def __init__(self, coordinator, allergyrisk, levels_current, location_slug, location_title):
pass
@property
def unique_id(self):
pass
@property
def icon(se... | 11 | 4 | 11 | 0 | 10 | 0 | 2 | 0.04 | 1 | 3 | 0 | 0 | 6 | 9 | 6 | 6 | 78 | 7 | 68 | 33 | 55 | 3 | 35 | 27 | 28 | 5 | 1 | 1 | 12 |
323,710 | krissen/polleninformation | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/krissen_polleninformation/custom_components/polleninformation/sensor.py | polleninformation.sensor.PolleninformationSensor | from datetime import datetime, timedelta, timezone
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DEFAULT_LANG, DOMAIN
from homeassistant.components.sensor import SensorEntity
class PolleninformationSensor(CoordinatorEntity, SensorEntity):
"""Generic sensor for pollen all... |
class PolleninformationSensor(CoordinatorEntity, SensorEntity):
'''Generic sensor for pollen allergen.'''
def __init__(self, coordinator, sensor_type, allergen_name, allergen_en, allergen_slug, allergen_latin, levels_current, levels_en, location_slug, location_title, icon):
pass
@property
def ... | 13 | 4 | 16 | 0 | 15 | 1 | 3 | 0.05 | 1 | 7 | 0 | 0 | 7 | 14 | 7 | 7 | 125 | 9 | 110 | 56 | 84 | 6 | 55 | 38 | 47 | 11 | 1 | 3 | 21 |
323,711 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/agent_manager.py | streetrace.agents.agent_manager.AgentManager | from pathlib import Path
from streetrace.agents.base_agent_loader import AgentInfo
from streetrace.system_context import SystemContext
import contextlib
from streetrace.llm.model_factory import ModelFactory
from contextlib import asynccontextmanager
from streetrace.tools.tool_provider import ToolProvider
from streetrac... |
class AgentManager:
'''Manages agent discovery, validation, and creation.
The AgentManager is responsible for:
1. Discovering agents in standard locations
2. Validating that agents implement the required interface
3. Creating agent instances with necessary dependencies
4. Managing the lifecycle... | 5 | 4 | 26 | 5 | 15 | 7 | 2 | 0.59 | 0 | 12 | 7 | 0 | 3 | 6 | 3 | 3 | 91 | 18 | 46 | 21 | 35 | 27 | 28 | 14 | 24 | 5 | 0 | 2 | 7 |
323,712 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/base_agent_loader.py | streetrace.agents.base_agent_loader.AgentInfo | from pathlib import Path
from typing import TYPE_CHECKING, Literal
class AgentInfo:
"""Agent information container supporting both Python and YAML agents."""
def __init__(self, name: str, description: str, file_path: Path | None=None, module: 'ModuleType | None'=None, yaml_document: 'YamlAgentDocument | None'... |
class AgentInfo:
'''Agent information container supporting both Python and YAML agents.'''
def __init__(self, name: str, description: str, file_path: Path | None=None, module: 'ModuleType | None'=None, yaml_document: 'YamlAgentDocument | None'=None) -> None:
'''Initialize agent info.
Args:
... | 6 | 4 | 13 | 1 | 9 | 3 | 2 | 0.37 | 0 | 3 | 0 | 0 | 3 | 5 | 3 | 3 | 46 | 5 | 30 | 20 | 17 | 11 | 21 | 11 | 17 | 3 | 0 | 1 | 7 |
323,713 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/base_agent_loader.py | streetrace.agents.base_agent_loader.AgentLoader | from abc import ABC, abstractmethod
from pathlib import Path
class AgentLoader(ABC):
"""Abstract base class for agent loaders."""
@abstractmethod
def discover(self) -> list[AgentInfo]:
"""Discover known agents.
Returns:
List of discovered agents
"""
@abstractmeth... |
class AgentLoader(ABC):
'''Abstract base class for agent loaders.'''
@abstractmethod
def discover(self) -> list[AgentInfo]:
'''Discover known agents.
Returns:
List of discovered agents
'''
pass
@abstractmethod
def load_agent(self, agent: str | Path | Agen... | 5 | 3 | 10 | 3 | 1 | 6 | 1 | 2.6 | 1 | 4 | 1 | 2 | 2 | 0 | 2 | 22 | 26 | 8 | 5 | 5 | 0 | 13 | 3 | 3 | 0 | 1 | 4 | 0 | 2 |
323,714 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/code_reviewer/agent.py | streetrace.agents.code_reviewer.agent.CodeReviewerAgent | from a2a.types import AgentCapabilities, AgentSkill
from streetrace.system_context import SystemContext
from streetrace.llm.model_factory import ModelFactory
from streetrace.tools.mcp_transport import HttpTransport
from streetrace.tools.tool_provider import AnyTool, ToolProvider
from typing import override
from streetr... |
class CodeReviewerAgent(StreetRaceAgent):
'''StreetRace Code Reviewer agent implementation.'''
@override
def get_agent_card(self) -> StreetRaceAgentCard:
'''Provide an A2A AgentCard.'''
pass
@override
async def get_required_tools(self) -> list[AnyTool]:
'''Provide a list of ... | 7 | 4 | 25 | 1 | 20 | 4 | 1 | 0.2 | 1 | 8 | 7 | 0 | 3 | 0 | 3 | 30 | 84 | 7 | 64 | 14 | 52 | 13 | 9 | 6 | 5 | 1 | 5 | 0 | 3 |
323,715 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/coder/agent.py | streetrace.agents.coder.agent.CoderAgent | from streetrace.agents.street_race_agent import StreetRaceAgent
from streetrace.tools.tool_provider import AnyTool, ToolProvider
from typing import TYPE_CHECKING, override
from streetrace.agents.street_race_agent_card import StreetRaceAgentCard
from a2a.types import AgentCapabilities, AgentSkill
from streetrace.system_... |
class CoderAgent(StreetRaceAgent):
'''StreetRace Coder agent implementation.'''
@override
def get_agent_card(self) -> StreetRaceAgentCard:
'''Provide an A2A AgentCard.'''
pass
@override
async def get_required_tools(self) -> list[AnyTool]:
'''Provide a list of required tool r... | 7 | 4 | 31 | 2 | 24 | 5 | 1 | 0.21 | 1 | 10 | 8 | 0 | 3 | 0 | 3 | 30 | 101 | 8 | 77 | 15 | 65 | 16 | 10 | 7 | 6 | 1 | 5 | 0 | 3 |
323,716 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/example/agent.py | streetrace.agents.example.agent.GenericAgent | from streetrace.llm.model_factory import ModelFactory
from streetrace.agents.street_race_agent_card import StreetRaceAgentCard
from streetrace.system_context import SystemContext
from streetrace.tools.mcp_transport import HttpTransport, StdioTransport
from streetrace.tools.tool_provider import AnyTool, ToolProvider
fro... |
class GenericAgent(StreetRaceAgent):
'''StreetRace Coder agent implementation.'''
@override
def get_agent_card(self) -> StreetRaceAgentCard:
'''Provide an A2A AgentCard.'''
pass
@override
async def get_required_tools(self) -> list[AnyTool]:
'''Provide a list of required tool... | 7 | 4 | 31 | 2 | 25 | 5 | 1 | 0.21 | 1 | 10 | 8 | 0 | 3 | 0 | 3 | 30 | 102 | 8 | 78 | 15 | 66 | 16 | 10 | 7 | 6 | 1 | 5 | 0 | 3 |
323,717 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/py_agent_loader.py | streetrace.agents.py_agent_loader.PythonAgentLoader | from typing import TYPE_CHECKING, Any, cast
from pathlib import Path
from streetrace.utils.file_discovery import find_files
from streetrace.agents.base_agent_loader import AgentInfo, AgentLoader
class PythonAgentLoader(AgentLoader):
"""Python agent loader implementing the AgentLoader interface."""
def __init_... |
class PythonAgentLoader(AgentLoader):
'''Python agent loader implementing the AgentLoader interface.'''
def __init__(self, base_paths: list[Path | str] | list[Path] | list[str]) -> None:
'''Initialize the PythonAgentLoader.
Args:
base_paths: List of base paths to search for agents
... | 4 | 4 | 27 | 5 | 16 | 6 | 5 | 0.37 | 1 | 9 | 1 | 0 | 3 | 1 | 3 | 25 | 86 | 19 | 49 | 14 | 45 | 18 | 37 | 14 | 33 | 8 | 5 | 2 | 14 |
323,718 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/yaml_agent.py | streetrace.agents.yaml_agent.YamlAgent | from streetrace.agents.street_race_agent_card import StreetRaceAgentCard
from typing import TYPE_CHECKING, override
from streetrace.agents.yaml_agent_builder import YamlAgentBuilder
from streetrace.tools.tool_provider import AnyTool, ToolProvider
from streetrace.agents.yaml_models import YamlAgentDocument
from streetra... |
class YamlAgent(StreetRaceAgent):
'''StreetRace agent implementation based on YAML specification.'''
def __init__(self, agent_doc: YamlAgentDocument) -> None:
'''Initialize with agent document.
Args:
agent_doc: Agent document containing YAML specification
'''
pass
... | 9 | 6 | 17 | 3 | 10 | 5 | 1 | 0.45 | 1 | 7 | 6 | 0 | 5 | 2 | 5 | 32 | 94 | 18 | 53 | 25 | 33 | 24 | 19 | 12 | 12 | 2 | 5 | 1 | 6 |
323,719 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/yaml_agent_builder.py | streetrace.agents.yaml_agent_builder.YamlAgentBuilder | import inspect
from streetrace.llm.model_factory import ModelFactory
from streetrace.agents.yaml_models import AgentRef, HttpServerConfig, InlineAgentSpec, McpToolSpec, StdioServerConfig, StreetraceToolSpec, ToolSpec, YamlAgentDocument, YamlAgentSpec
from streetrace.tools.tool_provider import AdkTool, AnyTool, ToolProv... |
class YamlAgentBuilder:
'''Builds ADK agents from YAML agent specifications.'''
def __init__(self, model_factory: ModelFactory, tool_provider: ToolProvider, system_context: SystemContext) -> None:
'''Initialize the builder.'''
pass
def _create_transport_from_server_config(self, server_con... | 12 | 9 | 22 | 3 | 15 | 4 | 4 | 0.28 | 0 | 25 | 16 | 0 | 11 | 3 | 11 | 11 | 255 | 40 | 168 | 67 | 129 | 47 | 108 | 43 | 93 | 9 | 0 | 3 | 43 |
323,720 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/yaml_agent_loader.py | streetrace.agents.yaml_agent_loader.YamlAgentLoader | from streetrace.utils.file_discovery import find_files
from pathlib import Path
from streetrace.agents.yaml_models import AgentRef, InlineAgentSpec, ToolSpec, YamlAgentDocument, YamlAgentSpec
from streetrace.agents.base_agent_loader import AgentCycleError, AgentInfo, AgentLoader, AgentValidationError
class YamlAgentLo... |
class YamlAgentLoader(AgentLoader):
'''YAML agent loader implementing the AgentLoader interface.'''
def __init__(self, base_paths: list[Path | str] | list[Path] | list[str]) -> None:
'''Initialize the YAML agent loader.
Args:
base_paths: List of base paths to search for agents
... | 4 | 4 | 29 | 5 | 16 | 7 | 4 | 0.47 | 1 | 8 | 4 | 0 | 3 | 1 | 3 | 25 | 91 | 19 | 49 | 18 | 43 | 23 | 41 | 16 | 35 | 8 | 5 | 2 | 13 |
323,721 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/yaml_models.py | streetrace.agents.yaml_models.StdioServerConfig | from typing import Any, Literal
from pydantic import BaseModel, Field, field_validator, model_validator
class StdioServerConfig(BaseModel):
"""Configuration for stdio MCP server."""
type: Literal[TransportType.STDIO] = TransportType.STDIO
command: str
args: list[str] = Field(default_factory=list)
e... |
class StdioServerConfig(BaseModel):
'''Configuration for stdio MCP server.'''
@field_validator('command', 'args', mode='before')
@classmethod
def expand_command_env_vars(cls, v: object) -> object:
'''Expand environment variables in command and args.'''
pass
@field_validator('env', m... | 7 | 3 | 9 | 0 | 8 | 1 | 4 | 0.13 | 1 | 3 | 0 | 0 | 0 | 0 | 2 | 84 | 30 | 3 | 24 | 8 | 17 | 3 | 15 | 6 | 12 | 4 | 5 | 1 | 7 |
323,722 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/agents/yaml_models.py | streetrace.agents.yaml_models.YamlAgentDocument | from pydantic import BaseModel, Field, field_validator, model_validator
from pathlib import Path
class YamlAgentDocument(BaseModel):
"""Root agent document with resolved references."""
spec: YamlAgentSpec
file_path: Path | None = None
def get_name(self) -> str:
"""Get the agent name."""
... |
class YamlAgentDocument(BaseModel):
'''Root agent document with resolved references.'''
def get_name(self) -> str:
'''Get the agent name.'''
pass
def get_description(self) -> str:
'''Get the agent description.'''
pass | 3 | 3 | 3 | 0 | 2 | 1 | 1 | 0.57 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 84 | 13 | 3 | 7 | 4 | 4 | 4 | 7 | 4 | 4 | 1 | 5 | 0 | 2 |
323,723 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/app.py | streetrace.app.Application | from streetrace.ui.console_ui import ConsoleUI
from streetrace.args import Args
from streetrace.ui import ui_events
import asyncio
from streetrace.input_handler import InputContext, InputHandler
from streetrace.preload_deps import preload_dependencies
from streetrace.app_state import AppState
from streetrace.ui.ui_bus ... |
class Application:
'''Orchestrates the StreetRace application flow.'''
def __init__(self, args: Args, state: AppState, ui: ConsoleUI, ui_bus: UiBus, input_handling_pipeline: list[InputHandler], session_manager: 'SessionManager') -> None:
'''Initialize the Application with necessary components and conf... | 8 | 6 | 20 | 2 | 16 | 3 | 3 | 0.19 | 0 | 15 | 10 | 0 | 7 | 6 | 7 | 7 | 152 | 18 | 114 | 34 | 98 | 22 | 73 | 24 | 65 | 6 | 0 | 3 | 21 |
323,724 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/args.py | streetrace.args.Args | from pathlib import Path
import typed_argparse as tap
from streetrace.utils.uid import get_user_identity
class Args(tap.TypedArgs):
"""App args."""
path: Path | None = tap.arg(help='Working directory', default=None)
model: str | None = tap.arg(help='Model to use, see https://docs.litellm.ai/docs/set_keys. ... |
class Args(tap.TypedArgs):
'''App args.'''
@property
def non_interactive_prompt(self) -> tuple[str | None, bool]:
'''Get non-interactive prompt provided in arguments.
If --prompt argument was provided, returns that.
If there were positional arguments, returns them as a prompt.
... | 9 | 5 | 16 | 3 | 8 | 5 | 3 | 0.34 | 1 | 5 | 0 | 0 | 4 | 0 | 4 | 4 | 103 | 17 | 64 | 24 | 55 | 22 | 38 | 20 | 33 | 4 | 1 | 2 | 11 |
323,725 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/bash_handler.py | streetrace.bash_handler.BashHandler | from streetrace.terminal_session import SessionData, SessionEvent, TerminalSession
from typing import override
from pathlib import Path
from streetrace.input_handler import HANDLED_CONT, SKIP, HandlerResult, InputContext, InputHandler
from subprocess import SubprocessError
class BashHandler(InputHandler):
"""Comma... |
class BashHandler(InputHandler):
'''Command to run a bash command in a virtual terminal.
Handles special command syntax: any user input starting from ! is treated as a bash
command.
'''
def __init__(self, work_dir: Path | None=None) -> None:
'''Initialize the BashCommand.
Args:
... | 6 | 4 | 30 | 6 | 16 | 7 | 3 | 0.52 | 1 | 11 | 5 | 0 | 3 | 1 | 3 | 24 | 124 | 28 | 63 | 20 | 50 | 33 | 37 | 12 | 31 | 4 | 5 | 1 | 11 |
323,726 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/command_executor.py | streetrace.commands.command_executor.CommandExecutor | from .base_command import Command
from streetrace.input_handler import HANDLED_STOP, SKIP, HandlerResult, InputContext, InputHandler
from collections.abc import Sequence
class CommandExecutor(InputHandler):
"""Manage and execute commands derived from the Command base class.
Handles registration of Command obj... |
class CommandExecutor(InputHandler):
'''Manage and execute commands derived from the Command base class.
Handles registration of Command objects and executes them based on user input,
passing the Application instance to the command's execute method.
Handles case-insensitivity and basic error management... | 7 | 6 | 22 | 3 | 13 | 6 | 3 | 0.5 | 1 | 9 | 3 | 0 | 5 | 1 | 5 | 26 | 125 | 23 | 68 | 16 | 58 | 34 | 39 | 11 | 33 | 5 | 5 | 2 | 13 |
323,727 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/definitions/compact_command.py | streetrace.commands.definitions.compact_command.CompactCommand | from streetrace.ui.ui_bus import UiBus
from streetrace.messages import COMPACT
from streetrace.commands.base_command import Command
from streetrace.args import Args
from streetrace.llm.model_factory import ModelFactory
from streetrace.system_context import SystemContext
from typing import TYPE_CHECKING, override
from s... |
class CompactCommand(Command):
'''Command to compact/summarize the conversation history to reduce token usage.'''
def __init__(self, ui_bus: UiBus, args: Args, session_manager: 'SessionManager', system_context: SystemContext, model_factory: ModelFactory) -> None:
'''Initialize a new instance of ResetS... | 9 | 5 | 25 | 2 | 22 | 1 | 3 | 0.06 | 1 | 10 | 7 | 0 | 5 | 5 | 5 | 28 | 137 | 14 | 116 | 40 | 92 | 7 | 60 | 27 | 49 | 8 | 5 | 4 | 16 |
323,728 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/definitions/help_command.py | streetrace.commands.definitions.help_command.HelpCommand | from typing import override
from streetrace.commands.command_executor import CommandExecutor
from streetrace.commands.base_command import Command
from streetrace.ui.ui_bus import UiBus
from streetrace.ui import ui_events
class HelpCommand(Command):
"""Displays a list of all available commands with their descriptio... |
class HelpCommand(Command):
'''Displays a list of all available commands with their descriptions.'''
def __init__(self, ui_bus: UiBus, cmd_executor: CommandExecutor) -> None:
'''Initialize the HelpCommand.
Args:
ui_bus: UI event bus to display command information.
cmd_e... | 8 | 5 | 10 | 2 | 4 | 4 | 1 | 0.89 | 1 | 5 | 3 | 0 | 4 | 2 | 4 | 27 | 49 | 13 | 19 | 13 | 11 | 17 | 16 | 10 | 11 | 2 | 5 | 1 | 5 |
323,729 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/definitions/history_command.py | streetrace.commands.definitions.history_command.HistoryCommand | from typing import TYPE_CHECKING, override
from streetrace.commands.base_command import Command
from streetrace.ui import ui_events
class HistoryCommand(Command):
"""Command to display the conversation history."""
def __init__(self, ui_bus: 'UiBus', system_context: 'SystemContext', session_manager: 'SessionMa... |
class HistoryCommand(Command):
'''Command to display the conversation history.'''
def __init__(self, ui_bus: 'UiBus', system_context: 'SystemContext', session_manager: 'SessionManager') -> None:
'''Initialize a new instance of HistoryCommand.'''
pass
@property
def names(self) -> list[s... | 8 | 5 | 8 | 0 | 7 | 1 | 1 | 0.16 | 1 | 4 | 2 | 0 | 4 | 3 | 4 | 27 | 41 | 4 | 32 | 19 | 19 | 5 | 17 | 11 | 12 | 2 | 5 | 1 | 5 |
323,730 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/definitions/history_command.py | streetrace.commands.definitions.history_command._DisplayHistory | from collections.abc import Sequence
from pydantic import BaseModel
class _DisplayHistory(BaseModel):
system_message: str | None
context: Sequence[str] | None
session: 'Session | None' |
class _DisplayHistory(BaseModel):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 5 | 0 | 0 |
323,731 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/commands/definitions/reset_command.py | streetrace.commands.definitions.reset_command.ResetSessionCommand | from streetrace.commands.base_command import Command
from typing import TYPE_CHECKING, override
from streetrace.ui import ui_events
class ResetSessionCommand(Command):
"""Command to clear the conversation history, resetting it to the initial state."""
def __init__(self, ui_bus: 'UiBus', session_manager: 'Sess... |
class ResetSessionCommand(Command):
'''Command to clear the conversation history, resetting it to the initial state.'''
def __init__(self, ui_bus: 'UiBus', session_manager: 'SessionManager') -> None:
'''Initialize a new instance of ResetSessionCommand.'''
pass
@property
def names(self)... | 8 | 5 | 6 | 0 | 5 | 1 | 1 | 0.27 | 1 | 3 | 1 | 0 | 4 | 2 | 4 | 27 | 32 | 4 | 22 | 10 | 14 | 6 | 12 | 7 | 7 | 1 | 5 | 0 | 4 |
323,732 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/llm/lite_llm_client.py | streetrace.llm.lite_llm_client.LiteLLMClientWithUsage | from streetrace.costs import UsageAndCost
from litellm.types.utils import ModelResponse, Usage
from litellm.litellm_core_utils.streaming_handler import CustomStreamWrapper
from streetrace.ui import ui_events
from google.adk.models.lite_llm import LiteLlm, LiteLLMClient
from streetrace.ui.ui_bus import UiBus
class Lite... |
class LiteLLMClientWithUsage(LiteLLMClient):
'''Provides acompletion method (for better testability).'''
def __init__(self, ui_bus: UiBus) -> None:
'''Initialize a new instance.'''
pass
def _process_usage_and_cost(self, model: str, messages: object, completion_response: object) -> None:
... | 5 | 4 | 22 | 2 | 15 | 8 | 3 | 0.51 | 1 | 8 | 3 | 0 | 4 | 1 | 4 | 4 | 94 | 12 | 61 | 30 | 38 | 31 | 29 | 12 | 24 | 6 | 1 | 2 | 10 |
323,733 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/llm/lite_llm_client.py | streetrace.llm.lite_llm_client.RetryingLiteLlm | from tenacity import AsyncRetrying, TryAgain, stop_after_attempt, wait_incrementing
from typing import Any, override
from google.adk.models.llm_request import LlmRequest
from google.adk.models.llm_response import LlmResponse
from streetrace.ui import ui_events
from litellm.exceptions import InternalServerError, RateLim... |
class RetryingLiteLlm(LiteLlm):
'''LiteLlm with built-in retry capabilities for generate_content_async.
This implementation adds tenacity-based retries to the original LiteLlm
implementation to handle transient errors like rate limits and server errors.
'''
def __init__(self, model: str, ui_bus: U... | 4 | 3 | 53 | 7 | 32 | 15 | 5 | 0.52 | 1 | 12 | 5 | 0 | 2 | 2 | 2 | 2 | 114 | 16 | 65 | 17 | 57 | 34 | 36 | 9 | 33 | 9 | 1 | 4 | 10 |
323,734 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/llm/llm_interface.py | streetrace.llm.llm_interface.AdkLiteLlmInterface | from streetrace.ui.ui_bus import UiBus
from typing import TYPE_CHECKING, Any, cast, override
from streetrace.ui import ui_events
class AdkLiteLlmInterface(LlmInterface):
"""LiteLLM interface for ADK using RetryingLiteLlm.
This implementation uses the RetryingLiteLlm class which has built-in retry
function... |
class AdkLiteLlmInterface(LlmInterface):
'''LiteLLM interface for ADK using RetryingLiteLlm.
This implementation uses the RetryingLiteLlm class which has built-in retry
functionality for handling transient errors like rate limits and server errors.
'''
def __init__(self, model: str, ui_bus: UiBus)... | 7 | 5 | 17 | 2 | 10 | 6 | 1 | 0.76 | 1 | 8 | 3 | 0 | 4 | 3 | 4 | 26 | 83 | 12 | 41 | 23 | 25 | 31 | 23 | 13 | 16 | 2 | 5 | 1 | 5 |
323,735 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/llm/llm_interface.py | streetrace.llm.llm_interface.LlmInterface | from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Any, cast, override
class LlmInterface(ABC):
"""A generic LLM interface.
Provides a way to call an LLM using StreetRace🚗💨 internal types for ease of use.
StreetRace🚗💨 uses:
streetrace.history.History for conversation histor... |
class LlmInterface(ABC):
'''A generic LLM interface.
Provides a way to call an LLM using StreetRace🚗💨 internal types for ease of use.
StreetRace🚗💨 uses:
streetrace.history.History for conversation history;
list[dict] for tools;
litellm.types.utils.ModelResponse for response.
... | 5 | 3 | 5 | 0 | 4 | 1 | 1 | 1.1 | 1 | 5 | 0 | 1 | 2 | 0 | 2 | 22 | 27 | 6 | 10 | 9 | 1 | 11 | 4 | 3 | 1 | 1 | 4 | 0 | 2 |
323,736 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/llm/model_factory.py | streetrace.llm.model_factory.ModelFactory | from streetrace.ui.ui_bus import UiBus
from streetrace.llm.llm_interface import AdkLiteLlmInterface, LlmInterface
class ModelFactory:
"""Factory class to create and manage models for the StreetRace application.
This class is responsible for:
1. Managing model configurations
2. Creating and caching Llm... |
class ModelFactory:
'''Factory class to create and manage models for the StreetRace application.
This class is responsible for:
1. Managing model configurations
2. Creating and caching LlmInterface instances
3. Providing access to underlying BaseLlm instances for agents
'''
def __init__(se... | 5 | 5 | 13 | 2 | 7 | 5 | 2 | 0.86 | 0 | 8 | 3 | 0 | 4 | 1 | 4 | 4 | 66 | 14 | 28 | 16 | 17 | 24 | 23 | 10 | 17 | 3 | 0 | 1 | 8 |
323,737 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/prompt_processor.py | streetrace.prompt_processor.PromptProcessor | from streetrace.args import Args
from streetrace.input_handler import HANDLED_CONT, SKIP, HandlerResult, InputContext, InputHandler
import re
import os
from streetrace.ui import ui_events
from streetrace.ui.ui_bus import UiBus
from pathlib import Path
class PromptProcessor(InputHandler):
"""Enrich user's prompt if... |
class PromptProcessor(InputHandler):
'''Enrich user's prompt if necessary.'''
def __init__(self, ui_bus: UiBus, args: Args) -> None:
'''Initialize the PromptProcessor.
Args:
ui_bus: UI event bus to exchange messages with the UI.
args: App args.
'''
pass
... | 4 | 4 | 41 | 7 | 28 | 6 | 4 | 0.21 | 1 | 13 | 7 | 0 | 3 | 2 | 3 | 24 | 128 | 24 | 86 | 32 | 76 | 18 | 60 | 25 | 56 | 10 | 5 | 4 | 13 |
323,738 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/session_md.py | streetrace.session_md.MDSessionWriter | import json
from marko.md_renderer import MarkdownRenderer
from types import TracebackType
from datetime import UTC, datetime
from google.adk.sessions import Session
from marko import Markdown
from google.genai import types as genai_types
from pathlib import Path
from google.adk.events import Event
class MDSessionWrit... |
class MDSessionWriter:
'''Markdown Session writer implementation.'''
def __init__(self, path: Path) -> None:
'''Initialize a new instance of MDSessionWriter writing to the provided path.'''
pass
def __enter__(self) -> 'MDSessionWriter':
pass
def __exit__(self, exc_type: type[... | 16 | 6 | 14 | 0 | 13 | 1 | 3 | 0.07 | 0 | 10 | 1 | 0 | 15 | 4 | 15 | 15 | 231 | 22 | 203 | 63 | 182 | 14 | 133 | 58 | 117 | 9 | 0 | 4 | 44 |
323,739 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/system_context.py | streetrace.system_context.SystemContext | from tzlocal import get_localzone
from pathlib import Path
from datetime import datetime
from streetrace import messages
from collections.abc import Sequence
from streetrace.ui import ui_events
from streetrace.ui.ui_bus import UiBus
class SystemContext:
"""Handle loading and providing system and project context fo... |
class SystemContext:
'''Handle loading and providing system and project context for AI interactions.
Responsible for reading the system message and project context files
from the configuration directory.
'''
def __init__(self, ui_bus: UiBus, context_dir: Path) -> None:
'''Initialize the Sy... | 5 | 5 | 28 | 3 | 20 | 5 | 3 | 0.28 | 0 | 9 | 3 | 0 | 4 | 2 | 4 | 4 | 121 | 18 | 81 | 23 | 72 | 23 | 51 | 16 | 46 | 7 | 0 | 2 | 12 |
323,740 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/terminal_session.py | streetrace.terminal_session.SessionData | from datetime import UTC, datetime
from dataclasses import dataclass, field
@dataclass
class SessionData:
"""Data entry for a terminal session."""
timestamp: datetime
source: str
content: str | @dataclass
class SessionData:
'''Data entry for a terminal session.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 1 | 3 | 2 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
323,741 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/terminal_session.py | streetrace.terminal_session.TerminalSession | import signal
import struct
import threading
from pathlib import Path
from datetime import UTC, datetime
import os
import fcntl
import tty
from types import FrameType
from streetrace.log import get_logger
import contextlib
import pty
from typing import Any
import subprocess
from collections.abc import Callable
import s... |
class TerminalSession:
'''Manages a terminal session with command execution and event callbacks.'''
def __init__(self, on_session_update: Callable[[SessionEvent], None] | None=None, on_session_complete: Callable[[SessionEvent], None] | None=None, work_dir: Path | None=None, *, terminal_width: int | None=None,... | 20 | 20 | 30 | 4 | 20 | 7 | 4 | 0.36 | 0 | 20 | 3 | 0 | 19 | 19 | 19 | 19 | 600 | 89 | 380 | 85 | 347 | 137 | 273 | 71 | 253 | 12 | 0 | 6 | 77 |
323,742 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/tools/mcp_transport.py | streetrace.tools.mcp_transport.StdioTransport | from typing import Any, Literal
from pydantic import BaseModel, Field
class StdioTransport(BaseModel):
"""Configuration for STDIO-based MCP connections."""
type: Literal['stdio'] = 'stdio'
command: str
args: list[str] = Field(default_factory=list)
cwd: str | None = Field(default=None, description='... |
class StdioTransport(BaseModel):
'''Configuration for STDIO-based MCP connections.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 11 | 1 | 9 | 5 | 8 | 1 | 6 | 5 | 5 | 0 | 5 | 0 | 0 |
323,743 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/tools/tool_refs.py | streetrace.tools.tool_refs.McpToolRef | from streetrace.tools.mcp_transport import Transport
from typing import Literal
from pydantic import BaseModel, Field
class McpToolRef(BaseModel):
"""Reference to MCP (Model Context Protocol) tools."""
kind: Literal['mcp'] = 'mcp'
name: str
server: Transport
tools: list[str] = Field(default_factory... |
class McpToolRef(BaseModel):
'''Reference to MCP (Model Context Protocol) tools.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.8 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 7 | 1 | 5 | 3 | 4 | 4 | 5 | 3 | 4 | 0 | 5 | 0 | 0 |
323,744 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/tools/tool_refs.py | streetrace.tools.tool_refs.StreetraceToolRef | from pydantic import BaseModel, Field
from typing import Literal
class StreetraceToolRef(BaseModel):
"""Reference to StreetRace internal tools."""
kind: Literal['streetrace'] = 'streetrace'
module: str
function: str |
class StreetraceToolRef(BaseModel):
'''Reference to StreetRace internal tools.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.75 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 6 | 1 | 4 | 2 | 3 | 3 | 4 | 2 | 3 | 0 | 5 | 0 | 0 |
323,745 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/adk_event_renderer.py | streetrace.ui.adk_event_renderer.EventRenderer | from streetrace.ui.colors import Styles
from typing import TYPE_CHECKING, Any
class EventRenderer:
"""Stateful renderer that groups function calls with their responses."""
def __init__(self) -> None:
"""Initialize the event renderer."""
self.pending_function_call: tuple[str, FunctionCall] | No... |
class EventRenderer:
'''Stateful renderer that groups function calls with their responses.'''
def __init__(self) -> None:
'''Initialize the event renderer.'''
pass
def render_event(self, obj: 'Event', console: 'Console') -> None:
'''Render the provided google.adk.events.Event to r... | 5 | 5 | 25 | 3 | 20 | 3 | 3 | 0.16 | 0 | 7 | 1 | 0 | 4 | 1 | 4 | 4 | 107 | 16 | 79 | 21 | 65 | 13 | 34 | 16 | 25 | 8 | 0 | 4 | 12 |
323,746 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/completer.py | streetrace.ui.completer.CommandCompleter | from streetrace.commands.command_executor import CommandExecutor
from prompt_toolkit.completion import CompleteEvent, Completer, Completion
from collections.abc import Iterable
import re
class CommandCompleter(Completer):
"""A prompt_toolkit /command completer.
Suggests predefined commands when the user types... |
class CommandCompleter(Completer):
'''A prompt_toolkit /command completer.
Suggests predefined commands when the user types '/'.
Only activates if the entire input consists only of the command being typed
(allowing for leading/trailing whitespace).
'''
def __init__(self, command_executor: Comm... | 3 | 3 | 24 | 4 | 15 | 6 | 2 | 0.55 | 1 | 4 | 1 | 0 | 2 | 1 | 2 | 24 | 56 | 10 | 31 | 16 | 24 | 17 | 14 | 11 | 11 | 2 | 4 | 1 | 3 |
323,747 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/completer.py | streetrace.ui.completer.PathCompleter | import re
from prompt_toolkit.completion import CompleteEvent, Completer, Completion
from pathlib import Path
from collections.abc import Iterable
import os
class PathCompleter(Completer):
"""A prompt_toolkit @path completer.
Suggests file and directory paths relative to a working directory when the user
... |
class PathCompleter(Completer):
'''A prompt_toolkit @path completer.
Suggests file and directory paths relative to a working directory when the user
types '@'. Only activates if the cursor is adjacent to or within a valid @-mention
path.
'''
def __init__(self, working_dir: Path) -> None:
... | 3 | 3 | 56 | 10 | 36 | 13 | 8 | 0.41 | 1 | 7 | 0 | 0 | 2 | 1 | 2 | 24 | 121 | 22 | 73 | 27 | 66 | 30 | 51 | 23 | 48 | 13 | 4 | 4 | 15 |
323,748 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/console_ui.py | streetrace.ui.console_ui.ConsoleUI | from streetrace.app_state import AppState
from typing import TYPE_CHECKING, Any
from streetrace.ui.render_protocol import render_using_registered_renderer
from prompt_toolkit.key_binding import KeyBindings
from prompt_toolkit.patch_stdout import patch_stdout
from prompt_toolkit import HTML, PromptSession
from streetrac... |
class ConsoleUI:
'''Handles all console input and output for the StreetRace application.
Encapsulates print statements and ANSI color codes for consistent UI.
Leverages a completer for interactive input suggestions.
'''
def __init__(self, app_state: AppState, completer: Completer, ui_bus: UiBus) -... | 16 | 9 | 12 | 1 | 8 | 4 | 1 | 0.53 | 0 | 19 | 4 | 0 | 7 | 6 | 7 | 7 | 143 | 25 | 87 | 35 | 61 | 46 | 55 | 23 | 40 | 4 | 0 | 2 | 18 |
323,749 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/console_ui.py | streetrace.ui.console_ui.StatusSpinner | from rich.console import Console
from streetrace.app_state import AppState
from types import TracebackType
class StatusSpinner:
"""Console Status, encapsulates rich.status."""
_ICON = 'hamburger'
_EMPTY_MESSAGE = 'Working...'
def __init__(self, app_state: AppState, console: Console) -> None:
"... |
class StatusSpinner:
'''Console Status, encapsulates rich.status.'''
def __init__(self, app_state: AppState, console: Console) -> None:
'''Initialize the instance and instantiate rich.status.
Args:
app_state: App State container.
console: The console instance to attach ... | 5 | 5 | 12 | 2 | 6 | 4 | 2 | 0.63 | 0 | 5 | 1 | 0 | 4 | 3 | 4 | 4 | 55 | 11 | 27 | 15 | 17 | 17 | 17 | 10 | 12 | 2 | 0 | 1 | 6 |
323,750 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/ui/ui_bus.py | streetrace.ui.ui_bus.UiBus | from pubsub.core import Publisher
from streetrace.costs import UsageAndCost
from typing import Any
from collections.abc import Callable
class UiBus:
"""UI event bus that helps exchange messages between UI and App logic."""
_publisher: Publisher
def __init__(self) -> None:
"""Initialize a new insta... |
class UiBus:
'''UI event bus that helps exchange messages between UI and App logic.'''
def __init__(self) -> None:
'''Initialize a new instance of UiBus with a separate pubsub Publisher.'''
pass
def dispatch_ui_update(self, event: Any) -> None:
'''Send a new renderable to the UI.
... | 10 | 10 | 11 | 3 | 3 | 6 | 1 | 2 | 0 | 5 | 1 | 0 | 9 | 0 | 9 | 9 | 114 | 37 | 26 | 10 | 16 | 52 | 20 | 10 | 10 | 1 | 0 | 0 | 9 |
323,751 | streetrace-ai/streetrace | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/streetrace-ai_streetrace/src/streetrace/workflow/supervisor.py | streetrace.workflow.supervisor.Supervisor | from streetrace.ui.adk_event_renderer import Event
from streetrace.ui import ui_events
from typing import TYPE_CHECKING, override
from streetrace.input_handler import HANDLED_CONT, HandlerResult, InputContext, InputHandler
from streetrace.ui.ui_bus import UiBus
class Supervisor(InputHandler):
"""Workflow superviso... |
class Supervisor(InputHandler):
'''Workflow supervisor manages and executes available workflows.'''
def __init__(self, agent_manager: 'AgentManager', session_manager: 'SessionManager', ui_bus: UiBus) -> None:
'''Initialize a new instance of workflow supervisor.
Args:
agent_manager:... | 4 | 3 | 52 | 7 | 28 | 19 | 5 | 0.66 | 1 | 5 | 4 | 0 | 2 | 4 | 2 | 23 | 108 | 15 | 58 | 24 | 47 | 38 | 34 | 17 | 29 | 8 | 5 | 5 | 9 |
323,752 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/pandas.py | air.api.pandas.PandasAPI | import pandas as pd
import traceback
import json
import os
from typing import Any
class PandasAPI:
"""
The class for Dataframe client
"""
def __init__(self, df_metadata_list: list[dict]) -> None:
"""
Initializes the dataframe API object.
Args:
df_metadata_list: lis... |
class PandasAPI:
'''
The class for Dataframe client
'''
def __init__(self, df_metadata_list: list[dict]) -> None:
'''
Initializes the dataframe API object.
Args:
df_metadata_list: list of (name, file_path) tuples of dataframes.
'''
pass
asyn... | 3 | 3 | 52 | 9 | 30 | 15 | 5 | 0.53 | 0 | 16 | 0 | 0 | 2 | 1 | 2 | 2 | 110 | 19 | 60 | 16 | 55 | 32 | 33 | 14 | 30 | 5 | 0 | 2 | 9 |
323,753 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/postgres.py | air.api.postgres.PostgresAPI | from typing import Any, Optional
import traceback
import asyncpg
class PostgresAPI:
"""
A class to manage PostgreSQL database interactions using asynchronous connections.
Attributes:
config (dict): Configuration settings for the database connection, including
"host", "port", "database"... |
class PostgresAPI:
'''
A class to manage PostgreSQL database interactions using asynchronous connections.
Attributes:
config (dict): Configuration settings for the database connection, including
"host", "port", "database", "user", and "password".
'''
def __init__(self, db_confi... | 3 | 3 | 29 | 2 | 17 | 11 | 3 | 0.82 | 0 | 7 | 0 | 0 | 2 | 1 | 2 | 2 | 68 | 7 | 34 | 13 | 29 | 28 | 24 | 9 | 21 | 4 | 0 | 3 | 5 |
323,754 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/azure_aisearch.py | air.api.vector_db.azure_aisearch.AzureAISearch | import requests
from requests.exceptions import HTTPError
from air.api.vector_db.base_vectordb import BaseVectorDB, VectorDBConfig
from air import auth
import json
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_random_exponential
from typing import List
from air.embeddings import Embeddin... |
class AzureAISearch(BaseVectorDB):
'''
Class to upload data to vector DB, inherits from BaseVectorDB
'''
def __init__(self, vectordb_config: VectorDBConfig):
pass
@retry(retry=retry_if_exception_type(requests.exceptions.HTTPError), stop=stop_after_attempt(5), wait=wait_random_exponential(m... | 6 | 3 | 34 | 2 | 27 | 6 | 2 | 0.22 | 1 | 7 | 2 | 0 | 3 | 7 | 3 | 25 | 120 | 8 | 92 | 32 | 76 | 20 | 41 | 18 | 37 | 4 | 5 | 1 | 7 |
323,755 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/base_vectordb.py | air.api.vector_db.base_vectordb.BaseVectorDB | class BaseVectorDB(metaclass=VectorDBMeta):
"""
Base configuration class for any vector DB
"""
def __init__(self, vectordb_config: VectorDBConfig):
self.url = vectordb_config.base_url
self.api_key = vectordb_config.api_key
self.api_version = vectordb_config.api_version
s... | class BaseVectorDB(metaclass=VectorDBMeta):
'''
Base configuration class for any vector DB
'''
def __init__(self, vectordb_config: VectorDBConfig):
pass | 2 | 1 | 5 | 0 | 5 | 0 | 1 | 0.5 | 1 | 1 | 1 | 2 | 1 | 4 | 1 | 22 | 10 | 1 | 6 | 6 | 4 | 3 | 6 | 6 | 4 | 1 | 4 | 0 | 1 |
323,756 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/base_vectordb.py | air.api.vector_db.base_vectordb.VectorDBConfig | from typing import List
from pydantic import BaseModel, Field
class VectorDBConfig(BaseModel):
"""
VectorDB configuration class
"""
type: str = Field(default='AzureAISearch', description='Type of the Vector DB')
base_url: str = Field(..., description='Vector DB URL')
api_key: str = Field(..., d... |
class VectorDBConfig(BaseModel):
'''
VectorDB configuration class
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.16 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 23 | 1 | 19 | 10 | 18 | 3 | 10 | 10 | 9 | 0 | 5 | 0 | 0 |
323,757 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/base_vectordb.py | air.api.vector_db.base_vectordb.VectorDBMeta | from abc import ABCMeta
from air.api.vector_db.vectordb_registry import VectorDBRegistry
class VectorDBMeta(ABCMeta):
"""
A metaclass that registers any concrete subclass of BaseVectorDB
in VectorDBRegistry at creation time.
Because BaseVectorDB already depends on ABC (which uses ABCMeta),
we must... |
class VectorDBMeta(ABCMeta):
'''
A metaclass that registers any concrete subclass of BaseVectorDB
in VectorDBRegistry at creation time.
Because BaseVectorDB already depends on ABC (which uses ABCMeta),
we must inherit from ABCMeta here to avoid a metaclass conflict.
'''
def __init__(cl... | 2 | 1 | 10 | 1 | 6 | 3 | 2 | 1.29 | 1 | 2 | 1 | 1 | 1 | 0 | 1 | 21 | 19 | 3 | 7 | 2 | 5 | 9 | 5 | 2 | 3 | 2 | 3 | 1 | 2 |
323,758 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/elastic_search.py | air.api.vector_db.elastic_search.ElasticSearch | from air.api.vector_db.base_vectordb import BaseVectorDB, VectorDBConfig
from air.embeddings import EmbeddingsClient
from tenacity import retry, retry_if_exception_type, stop_after_attempt, wait_random_exponential
from air import auth
from typing import List
import json
import requests
from requests.exceptions import H... |
class ElasticSearch(BaseVectorDB):
'''
A class to interact with the ElasticSearch API for vector-based retrieval.
This class uses embeddings generated by the embed_api client to perform vector
searches on an ElasticSearch index, returning relevant documents based on
the user’s query.
'''
d... | 6 | 3 | 38 | 2 | 30 | 6 | 3 | 0.24 | 1 | 7 | 2 | 0 | 3 | 7 | 3 | 25 | 135 | 10 | 102 | 35 | 86 | 24 | 47 | 21 | 43 | 5 | 5 | 2 | 10 |
323,759 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/api/vector_db/vectordb_registry.py | air.api.vector_db.vectordb_registry.VectorDBRegistry | class VectorDBRegistry:
"""
A global registry that keeps track of all vector db classes
(subclasses of BaseVectorDB).
"""
_registry = {}
@classmethod
def register(cls, subclass):
"""
Register a subclass in the global registry. The key is the class name,
but you can c... | class VectorDBRegistry:
'''
A global registry that keeps track of all vector db classes
(subclasses of BaseVectorDB).
'''
@classmethod
def register(cls, subclass):
'''
Register a subclass in the global registry. The key is the class name,
but you can choose any naming... | 7 | 4 | 6 | 0 | 3 | 4 | 1 | 1.15 | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 3 | 32 | 4 | 13 | 9 | 6 | 15 | 10 | 6 | 6 | 2 | 0 | 1 | 4 |
323,760 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/asr_client.py | air.audio.asr_client.ASRClient | from typing import IO, AsyncGenerator, AsyncIterator, Generator, Iterator, Literal, Union, cast, overload
import os
from air import __version__
from air.types.audio import APIResponse, AsyncAPIResponse, AsyncResponseContextManager, AsyncStream, ChunkingStrategy, ResponseContextManager, Stream, TranscriptionStreamEvent
... |
class ASRClient:
'''
A synchronous client for the speech-to-text endpoint.
This class handles sending requests to the speech-to-text endpoint
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, str] | N... | 10 | 3 | 25 | 2 | 20 | 4 | 2 | 0.3 | 0 | 12 | 4 | 0 | 5 | 3 | 5 | 5 | 141 | 17 | 101 | 46 | 71 | 30 | 42 | 19 | 35 | 5 | 0 | 3 | 14 |
323,761 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/asr_client.py | air.audio.asr_client.AsyncASRClient | from air.types import ASRResponse
from air.types.audio import APIResponse, AsyncAPIResponse, AsyncResponseContextManager, AsyncStream, ChunkingStrategy, ResponseContextManager, Stream, TranscriptionStreamEvent
from functools import cached_property
from air import __version__
import aiohttp
from pydantic import TypeAdap... |
class AsyncASRClient:
'''
An asynchronous client for the speech-to-text endpoint.
This class handles sending requests to the speech-to-text endpoint
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, s... | 12 | 3 | 29 | 2 | 23 | 5 | 2 | 0.32 | 0 | 13 | 5 | 0 | 5 | 3 | 5 | 5 | 165 | 20 | 115 | 54 | 81 | 37 | 57 | 22 | 48 | 7 | 0 | 4 | 17 |
323,762 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/asr_client.py | air.audio.asr_client.AsyncTranscriptionsWithStreamingResponse | from contextlib import asynccontextmanager, contextmanager
from typing import IO, AsyncGenerator, AsyncIterator, Generator, Iterator, Literal, Union, cast, overload
import aiohttp
import json
from air.types import ASRResponse
import os
from air import __version__
from air.types.audio import APIResponse, AsyncAPIRespons... |
class AsyncTranscriptionsWithStreamingResponse:
'''
A wrapper class for creating asynchronous speech-to-text transcriptions
with support for streaming responses.
This class applies the same transcription logic to as `AsyncASRClient`,
while returning responses using an async context manager.
'''... | 8 | 2 | 35 | 3 | 27 | 6 | 2 | 0.35 | 0 | 14 | 6 | 0 | 2 | 1 | 2 | 2 | 150 | 18 | 102 | 47 | 70 | 36 | 42 | 17 | 36 | 7 | 0 | 2 | 12 |
323,763 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/asr_client.py | air.audio.asr_client.TranscriptionsWithStreamingResponse | import os
import requests
from typing import IO, AsyncGenerator, AsyncIterator, Generator, Iterator, Literal, Union, cast, overload
from air.types import ASRResponse
import json
from air.types.audio import APIResponse, AsyncAPIResponse, AsyncResponseContextManager, AsyncStream, ChunkingStrategy, ResponseContextManager,... |
class TranscriptionsWithStreamingResponse:
'''
A wrapper class for creating synchronous speech-to-text transcriptions
with support for streaming responses.
This class applies the same transcription logic to as `ASRClient`,
while returning responses using an async context manager.
'''
def _... | 8 | 2 | 35 | 3 | 27 | 5 | 2 | 0.34 | 0 | 13 | 6 | 0 | 2 | 1 | 2 | 2 | 141 | 17 | 96 | 40 | 68 | 33 | 31 | 16 | 25 | 5 | 0 | 1 | 10 |
323,764 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/client.py | air.audio.client.AsyncAudio | from air.audio.asr_client import ASRClient, AsyncASRClient
from air.audio.tts_client import AsyncTTSClient, TTSClient
class AsyncAudio:
"""
An audio client that exposes asr and tts in a single interface,
operating asynchronously.
"""
def __init__(self, api_key: str, base_url: str, default_headers:... |
class AsyncAudio:
'''
An audio client that exposes asr and tts in a single interface,
operating asynchronously.
'''
def __init__(self, api_key: str, base_url: str, default_headers: dict[str, str] | None=None, **kwargs):
'''
Initializes the asynchronous unified audio client with sub... | 2 | 2 | 36 | 3 | 21 | 12 | 1 | 0.77 | 0 | 4 | 2 | 0 | 1 | 6 | 1 | 1 | 42 | 4 | 22 | 14 | 14 | 17 | 8 | 8 | 6 | 1 | 0 | 0 | 1 |
323,765 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/client.py | air.audio.client.Audio | from air.audio.asr_client import ASRClient, AsyncASRClient
from air.audio.tts_client import AsyncTTSClient, TTSClient
class Audio:
"""
An audio client that exposes asr and tts in a single interface,
operating synchronously.
"""
def __init__(self, api_key: str, base_url: str, default_headers: dict[... |
class Audio:
'''
An audio client that exposes asr and tts in a single interface,
operating synchronously.
'''
def __init__(self, api_key: str, base_url: str, default_headers: dict[str, str] | None=None, **kwargs):
'''
Initializes the synchronous unified client with sub-clients.
... | 2 | 2 | 36 | 3 | 21 | 12 | 1 | 0.77 | 0 | 4 | 2 | 0 | 1 | 6 | 1 | 1 | 42 | 4 | 22 | 14 | 14 | 17 | 8 | 8 | 6 | 1 | 0 | 0 | 1 |
323,766 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/tts_client.py | air.audio.tts_client.AsyncTTSClient | from air.types.audio import TTSResponse
from functools import cached_property
from typing import Any, AsyncGenerator
from air import __version__
import aiohttp
class AsyncTTSClient:
"""
An asynchronous client for the text-to-speech endpoint.
This class handles sending requests to the text-to-speech endpoi... |
class AsyncTTSClient:
'''
An asynchronous client for the text-to-speech endpoint.
This class handles sending requests to the text-to-speech endpoint
and converts the responses into TTSResponse objects for type safety.
Supports both batch and streaming synthesis:
- create(): Returns complete aud... | 5 | 4 | 34 | 3 | 20 | 12 | 3 | 0.73 | 0 | 9 | 2 | 0 | 3 | 3 | 3 | 3 | 116 | 13 | 62 | 30 | 41 | 45 | 26 | 10 | 22 | 6 | 0 | 3 | 8 |
323,767 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/tts_client.py | air.audio.tts_client.AsyncTTSClientWithStreamingResponse | from air import __version__
from typing import Any, AsyncGenerator
import aiohttp
class AsyncTTSClientWithStreamingResponse:
"""
Streaming response wrapper for AsyncTTSClient.
This wrapper enables OpenAI-compatible streaming syntax using
client.audio.speech.with_streaming_response.create(...)
"""
... |
class AsyncTTSClientWithStreamingResponse:
'''
Streaming response wrapper for AsyncTTSClient.
This wrapper enables OpenAI-compatible streaming syntax using
client.audio.speech.with_streaming_response.create(...)
'''
def __init__(self, client: AsyncTTSClient):
'''
Initialize the... | 4 | 3 | 36 | 3 | 24 | 10 | 3 | 0.59 | 0 | 11 | 2 | 0 | 2 | 1 | 2 | 2 | 98 | 11 | 56 | 24 | 40 | 33 | 26 | 9 | 22 | 5 | 0 | 5 | 10 |
323,768 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/tts_client.py | air.audio.tts_client.StreamingResponse | import io
class StreamingResponse:
"""Wrapper to make streaming responses Open AI compatible.
Provides both sync and async iteration over audio chunks, with methods
for saving streamed content to files. Automatically handles the difference
between sync and async streaming based on the is_async flag.
... |
class StreamingResponse:
'''Wrapper to make streaming responses Open AI compatible.
Provides both sync and async iteration over audio chunks, with methods
for saving streamed content to files. Automatically handles the difference
between sync and async streaming based on the is_async flag.
Args:
... | 11 | 11 | 8 | 1 | 4 | 3 | 2 | 1.1 | 0 | 1 | 0 | 0 | 10 | 3 | 10 | 10 | 108 | 20 | 42 | 20 | 31 | 46 | 41 | 19 | 30 | 3 | 0 | 2 | 17 |
323,769 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/tts_client.py | air.audio.tts_client.TTSClient | import requests
from air import __version__
from air.types.audio import TTSResponse
from functools import cached_property
from typing import Any, AsyncGenerator
class TTSClient:
"""
A synchronous client for the text-to-speech endpoint.
This class handles sending requests to the text-to-speech endpoint
... |
class TTSClient:
'''
A synchronous client for the text-to-speech endpoint.
This class handles sending requests to the text-to-speech endpoint
and converts the responses into TTSResponse objects for type safety.
Supports both batch and streaming synthesis:
- create(): Returns complete audio (bat... | 5 | 3 | 30 | 3 | 19 | 10 | 3 | 0.64 | 0 | 7 | 2 | 0 | 3 | 3 | 3 | 3 | 106 | 13 | 59 | 29 | 38 | 38 | 25 | 11 | 21 | 6 | 0 | 1 | 8 |
323,770 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/audio/tts_client.py | air.audio.tts_client.TTSClientWithStreamingResponse | import requests
from typing import Any, AsyncGenerator
from air import __version__
class TTSClientWithStreamingResponse:
"""
Streaming response wrapper for TTSClient.
This wrapper enables OpenAI-compatible streaming syntax using
client.audio.speech.with_streaming_response.create(...)
"""
def ... |
class TTSClientWithStreamingResponse:
'''
Streaming response wrapper for TTSClient.
This wrapper enables OpenAI-compatible streaming syntax using
client.audio.speech.with_streaming_response.create(...)
'''
def __init__(self, client: TTSClient):
'''
Initialize the streaming wrap... | 4 | 4 | 36 | 4 | 23 | 10 | 3 | 0.61 | 0 | 8 | 2 | 0 | 2 | 1 | 2 | 2 | 98 | 12 | 54 | 23 | 38 | 33 | 25 | 10 | 21 | 5 | 0 | 3 | 10 |
323,771 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/authenticator.py | air.authenticator.Authenticator | import time
from typing import Any, Optional
import requests
from air import __base_url__, __version__
class Authenticator:
"""Handles authentication for the AI Refinery platform."""
timeout = 3000
def __init__(self, account: Optional[str]=None, api_key: Optional[str]=None, base_url: Optional[str]=None):
... |
class Authenticator:
'''Handles authentication for the AI Refinery platform.'''
def __init__(self, account: Optional[str]=None, api_key: Optional[str]=None, base_url: Optional[str]=None):
'''
Initialize the Authenticator, attempting to log in using provided credentials.
Args:
... | 5 | 5 | 20 | 2 | 12 | 6 | 2 | 0.51 | 0 | 4 | 0 | 0 | 4 | 5 | 4 | 4 | 87 | 11 | 51 | 21 | 41 | 26 | 31 | 15 | 26 | 4 | 0 | 1 | 9 |
323,772 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/chat/client.py | air.chat.client.AsyncChatClient | class AsyncChatClient:
"""
A higher-level asynchronous chat client that groups related API calls.
This object provides a `.completions` property (AsyncChatCompletionsClient),
so you can use: await client.completions.create(...)
"""
def __init__(self, base_url: str, api_key: str, default_header... | class AsyncChatClient:
'''
A higher-level asynchronous chat client that groups related API calls.
This object provides a `.completions` property (AsyncChatCompletionsClient),
so you can use: await client.completions.create(...)
'''
def __init__(self, base_url: str, api_key: str, default_headers... | 2 | 2 | 21 | 2 | 11 | 8 | 1 | 1.17 | 0 | 3 | 1 | 0 | 1 | 1 | 1 | 1 | 29 | 4 | 12 | 8 | 5 | 14 | 3 | 3 | 1 | 1 | 0 | 0 | 1 |
323,773 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/chat/client.py | air.chat.client.AsyncChatCompletionsClient | from air import __version__
from air.types import ChatCompletion
import aiohttp
class AsyncChatCompletionsClient:
"""
An asynchronous client for the chat completions endpoint.
This class sends requests to create chat completions
and converts the responses into Pydantic models for type safety.
"""
... |
class AsyncChatCompletionsClient:
'''
An asynchronous client for the chat completions endpoint.
This class sends requests to create chat completions
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, s... | 3 | 3 | 36 | 4 | 20 | 13 | 2 | 0.8 | 0 | 8 | 1 | 0 | 2 | 3 | 2 | 2 | 81 | 10 | 40 | 26 | 23 | 32 | 17 | 10 | 14 | 3 | 0 | 2 | 4 |
323,774 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/chat/client.py | air.chat.client.ChatClient | class ChatClient:
"""
A higher-level synchronous chat client that groups related API calls.
This object provides a `.completions` property (ChatCompletionsClient),
so you can use: client.completions.create(...)
"""
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, str]... | class ChatClient:
'''
A higher-level synchronous chat client that groups related API calls.
This object provides a `.completions` property (ChatCompletionsClient),
so you can use: client.completions.create(...)
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, str] ... | 2 | 2 | 21 | 2 | 11 | 8 | 1 | 1.17 | 0 | 3 | 1 | 0 | 1 | 1 | 1 | 1 | 29 | 4 | 12 | 8 | 5 | 14 | 3 | 3 | 1 | 1 | 0 | 0 | 1 |
323,775 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/chat/client.py | air.chat.client.ChatCompletionsClient | from air.types import ChatCompletion
import requests
from air import __version__
class ChatCompletionsClient:
"""
A synchronous client for the chat completions endpoint.
This class sends requests to create chat completions and converts
the responses into Pydantic models for type safety.
"""
d... |
class ChatCompletionsClient:
'''
A synchronous client for the chat completions endpoint.
This class sends requests to create chat completions and converts
the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, str] | N... | 3 | 3 | 38 | 4 | 21 | 14 | 2 | 0.77 | 0 | 6 | 1 | 0 | 2 | 3 | 2 | 2 | 85 | 10 | 43 | 24 | 26 | 33 | 15 | 10 | 12 | 3 | 0 | 1 | 4 |
323,776 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/client.py | air.client.AIRefinery | from air.knowledge import AsyncKnowledgeClient, KnowledgeClient
from air.chat import AsyncChatClient, ChatClient
from air.embeddings import AsyncEmbeddingsClient, EmbeddingsClient
from air.models import AsyncModelsClient, ModelsClient
from air.audio import AsyncAudio, Audio
from air.images import AsyncImagesClient, Ima... |
class AIRefinery:
'''
A top-level client that exposes various sub-clients in a single interface,
operating synchronously.
Example usage:
client = AIRefinery(
api_key="...",
base_url="...",
default_headers={"X-Client-Version": "1.2.3"}
)
# Use ... | 5 | 4 | 29 | 2 | 16 | 10 | 1 | 1.43 | 0 | 9 | 6 | 0 | 3 | 10 | 3 | 3 | 143 | 20 | 51 | 21 | 40 | 73 | 18 | 14 | 14 | 2 | 0 | 1 | 4 |
323,777 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/client.py | air.client.AsyncAIRefinery | from air.models import AsyncModelsClient, ModelsClient
from air.embeddings import AsyncEmbeddingsClient, EmbeddingsClient
from air.images import AsyncImagesClient, ImagesClient
from air.distiller import AsyncDistillerClient
from air.knowledge import AsyncKnowledgeClient, KnowledgeClient
from air.chat import AsyncChatCl... |
class AsyncAIRefinery:
'''
A top-level client that exposes various sub-clients in a single interface,
operating asynchronously.
Example usage:
client = AsyncAIRefinery(
api_key="...",
base_url="...",
default_headers={"X-Client-Version": "1.2.3"}
)
... | 3 | 3 | 42 | 4 | 25 | 14 | 2 | 1.43 | 0 | 9 | 7 | 0 | 2 | 11 | 2 | 2 | 142 | 19 | 51 | 20 | 42 | 73 | 17 | 14 | 14 | 2 | 0 | 1 | 3 |
323,778 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/client.py | air.distiller.client.AsyncDistillerClient | import websockets
from typing import Any, Callable, Optional, cast
from importlib.metadata import version
from air import PostgresAPI, __base_url__, __version__, auth
import requests
import asyncio
from omegaconf import OmegaConf
from air.utils import async_input, async_print
import traceback
from air.distiller.executo... |
class AsyncDistillerClient:
'''
Distiller SDK for AI Refinery.
This class provides an interface for interacting with the AI Refinery's
distiller service, allowing users to create projects, download configurations,
and run distiller sessions.
'''
def __init__(self, *, base_url: str='', api_... | 29 | 25 | 32 | 4 | 20 | 8 | 4 | 0.4 | 0 | 17 | 3 | 0 | 24 | 16 | 24 | 24 | 903 | 136 | 549 | 176 | 473 | 222 | 363 | 121 | 334 | 14 | 0 | 4 | 107 |
323,779 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/amazon_bedrock_executor.py | air.distiller.executor.amazon_bedrock_executor.AmazonBedrockExecutor | import asyncio
import uuid
from air.types.distiller.executor.amazon_bedrock_config import AmazonBedrockAgentConfig
from air.distiller.executor.executor import Executor
from typing import Any, Callable, Dict
class AmazonBedrockExecutor(Executor):
"""Executor class for AWS Agents leveraging AWS Bedrock.
This cl... |
class AmazonBedrockExecutor(Executor):
'''Executor class for AWS Agents leveraging AWS Bedrock.
This class extends the generic `Executor` to provide functionality for interacting
with an AWS Bedrock agent created in the UI.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queu... | 4 | 4 | 36 | 3 | 23 | 10 | 2 | 0.51 | 1 | 8 | 2 | 0 | 3 | 1 | 3 | 9 | 120 | 13 | 71 | 25 | 57 | 36 | 34 | 15 | 30 | 3 | 1 | 1 | 7 |
323,780 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/amazon_bedrock_executor.py | air.distiller.executor.amazon_bedrock_executor.AmazonBedrockSessionManager | import os
import uuid
import logging
class AmazonBedrockSessionManager:
"""
Manages the AWS agent session lifecycle.
"""
def __init__(self, client_key, client_secret, deployment_region, agent_id, alias_id, session_id):
"""
Initializes the AmazonBedrockSessionManager.
Args:
... |
class AmazonBedrockSessionManager:
'''
Manages the AWS agent session lifecycle.
'''
def __init__(self, client_key, client_secret, deployment_region, agent_id, alias_id, session_id):
'''
Initializes the AmazonBedrockSessionManager.
Args:
client_key: The mapping to th... | 5 | 4 | 20 | 2 | 15 | 4 | 3 | 0.34 | 0 | 2 | 0 | 0 | 4 | 7 | 4 | 4 | 89 | 10 | 59 | 28 | 46 | 20 | 36 | 19 | 31 | 6 | 0 | 4 | 10 |
323,781 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/analytics_executor.py | air.distiller.executor.analytics_executor.AnalyticsExecutor | import asyncio
from air.api import PostgresAPI, PandasAPI
from air.distiller.executor.executor import Executor
from typing import Callable, Dict, Any
class AnalyticsExecutor(Executor):
"""Executor class for AnalyticsAgent.
Extends Executor to support multiple retriever functions based on retriever types.
... |
class AnalyticsExecutor(Executor):
'''Executor class for AnalyticsAgent.
Extends Executor to support multiple retriever functions based on retriever types.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dic... | 3 | 3 | 65 | 7 | 43 | 15 | 7 | 0.38 | 1 | 10 | 2 | 0 | 2 | 1 | 2 | 8 | 138 | 17 | 88 | 24 | 75 | 33 | 60 | 13 | 57 | 10 | 1 | 4 | 14 |
323,782 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/azure_executor.py | air.distiller.executor.azure_executor.AzureExecutor | from air.distiller.executor.executor import Executor
from typing import Any, Callable, Dict, Optional
import asyncio
from air.types.distiller.executor.azure_config import AzureAgentConfig
class AzureExecutor(Executor):
"""Executor class for Azure Web Agent leveraging Azure AI's agent engines.
This class exten... |
class AzureExecutor(Executor):
'''Executor class for Azure Web Agent leveraging Azure AI's agent engines.
This class extends the generic `Executor` to provide functionality for interacting
with an Azure AI agent via its Web UI creation mode.
'''
def __init__(self, func: Dict[str, Callable], send_q... | 4 | 4 | 55 | 7 | 30 | 18 | 5 | 0.64 | 1 | 7 | 1 | 0 | 3 | 2 | 3 | 9 | 177 | 27 | 92 | 30 | 78 | 59 | 57 | 19 | 53 | 11 | 1 | 5 | 15 |
323,783 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/databricks_executor.py | air.distiller.executor.databricks_executor.DatabricksExecutor | from air.distiller.executor.executor import Executor
import asyncio
from air.types.distiller.executor.databricks_config import DatabricksAgentConfig
import json
from typing import Any, Callable, Dict
class DatabricksExecutor(Executor):
"""
Executor class for Databricks Agent.
"""
agent_class: str = 'Da... |
class DatabricksExecutor(Executor):
'''
Executor class for Databricks Agent.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dict[str, Any], return_string: bool=True):
'''
Initializes the... | 4 | 4 | 36 | 3 | 28 | 6 | 3 | 0.23 | 1 | 10 | 2 | 0 | 3 | 5 | 3 | 9 | 118 | 12 | 86 | 25 | 72 | 20 | 45 | 14 | 41 | 6 | 1 | 3 | 10 |
323,784 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/databricks_executor.py | air.distiller.executor.databricks_executor.DatabricksSessionManager | import os
from databricks.sdk import WorkspaceClient
class DatabricksSessionManager:
"""
Manages the Databricks agent session.
"""
def __init__(self, client_id_env_var, client_secret_env_var, host_url_env_var, genie_space_id_env_var):
"""
Initializes the DatabricksSessionManager.
... |
class DatabricksSessionManager:
'''
Manages the Databricks agent session.
'''
def __init__(self, client_id_env_var, client_secret_env_var, host_url_env_var, genie_space_id_env_var):
'''
Initializes the DatabricksSessionManager.
Args:
genie_space_id: The Databricks G... | 7 | 6 | 16 | 1 | 10 | 5 | 2 | 0.54 | 0 | 1 | 0 | 0 | 6 | 6 | 6 | 6 | 105 | 14 | 59 | 27 | 44 | 32 | 32 | 19 | 25 | 4 | 0 | 1 | 10 |
323,785 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/executor.py | air.distiller.executor.executor.Executor | import concurrent.futures
import inspect
from typing import Callable, Optional, Union, Dict
import asyncio
class Executor:
"""
Executor class for handling the execution of synchronous or asynchronous functions.
Attributes:
agent_class (str): The name of the agent class.
"""
agent_class: st... |
class Executor:
'''
Executor class for handling the execution of synchronous or asynchronous functions.
Attributes:
agent_class (str): The name of the agent class.
'''
def __init__(self, func: Union[Callable, Dict[str, Callable]], send_queue: asyncio.Queue, account: str, project: s... | 7 | 4 | 29 | 3 | 19 | 6 | 2 | 0.36 | 0 | 7 | 0 | 13 | 6 | 8 | 6 | 6 | 186 | 26 | 118 | 49 | 95 | 43 | 61 | 31 | 54 | 4 | 0 | 2 | 13 |
323,786 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/google_executor.py | air.distiller.executor.google_executor.GoogleExecutor | import json
import asyncio
from air.distiller.executor.executor import Executor
from air.types.distiller.executor.google_config import GoogleAgentConfig
from typing import Any, Callable, Dict, Optional
class GoogleExecutor(Executor):
"""Executor class for GoogleAgent leveraging Vertex AI Agents.
This class ex... |
class GoogleExecutor(Executor):
'''Executor class for GoogleAgent leveraging Vertex AI Agents.
This class extends the generic `Executor` to provide functionality
for interacting with Google Vertex AI's agent engines. It requires a
valid `resource_name` in `utility_config` to fetch a Vertex AI agent eng... | 3 | 3 | 69 | 8 | 42 | 20 | 6 | 0.52 | 1 | 7 | 1 | 0 | 2 | 1 | 2 | 8 | 150 | 20 | 86 | 31 | 73 | 45 | 47 | 20 | 44 | 10 | 1 | 7 | 12 |
323,787 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/human_executor.py | air.distiller.executor.human_executor.HumanExecutor | from air.types.distiller.executor.human_config import HumanAgentConfig
from typing import Any, Callable, Dict, Union
from air.distiller.executor.executor import Executor
import asyncio
class HumanExecutor(Executor):
"""
Executor for the HumanAgent. Prompts the user for input when a 'wait' status is received.
... |
class HumanExecutor(Executor):
'''
Executor for the HumanAgent. Prompts the user for input when a 'wait' status is received.
This class determines how the input is collected (via terminal or a custom function),
and sends the user’s response back through an asyncio queue to downstream agents.
'''
... | 3 | 3 | 47 | 6 | 29 | 13 | 3 | 0.51 | 1 | 6 | 1 | 0 | 2 | 1 | 2 | 8 | 104 | 15 | 59 | 20 | 46 | 30 | 24 | 10 | 21 | 5 | 1 | 3 | 6 |
323,788 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/mcp_executor.py | air.distiller.executor.mcp_executor.MCPExecutor | from typing import Any, Callable, Dict, List, Optional
import asyncio
from air.distiller.executor.executor import Executor
from air.types.distiller.executor.mcp_config import MCPClientAgentConfig
import json
class MCPExecutor(Executor):
"""
Executor for MCPClientAgent.
"""
agent_class: str = 'MCPClient... |
class MCPExecutor(Executor):
'''
Executor for MCPClientAgent.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dict[str, Any], return_string: bool=True) -> None:
pass
async def _json_tools(self) ... | 5 | 3 | 31 | 3 | 26 | 3 | 4 | 0.14 | 1 | 10 | 1 | 0 | 4 | 2 | 4 | 10 | 134 | 18 | 104 | 35 | 89 | 15 | 59 | 22 | 54 | 6 | 1 | 5 | 16 |
323,789 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/salesforce_executor.py | air.distiller.executor.salesforce_executor.SalesforceExecutor | from typing import Any, Callable, Dict
from air.distiller.executor.executor import Executor
import uuid
from air.types.distiller.executor.salesforce_config import SalesforceAgentConfig
import asyncio
class SalesforceExecutor(Executor):
"""
Executor class for Salesforce Agent.
"""
agent_class: str = 'Sa... |
class SalesforceExecutor(Executor):
'''
Executor class for Salesforce Agent.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dict[str, Any], return_string: bool=True):
'''
Initializes the... | 4 | 4 | 36 | 3 | 28 | 5 | 3 | 0.24 | 1 | 8 | 2 | 0 | 3 | 5 | 3 | 9 | 119 | 14 | 85 | 28 | 71 | 20 | 45 | 18 | 41 | 4 | 1 | 2 | 9 |
323,790 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/salesforce_executor.py | air.distiller.executor.salesforce_executor.SalesforceSessionManager | import os
import requests
import uuid
class SalesforceSessionManager:
"""
Manages the Salesforce agent session lifecycle.
"""
def __init__(self, domain, agent_id, token):
"""
Initializes the SalesforceSessionManager.
Args:
domain: The Salesforce orgfarm domain URL.... |
class SalesforceSessionManager:
'''
Manages the Salesforce agent session lifecycle.
'''
def __init__(self, domain, agent_id, token):
'''
Initializes the SalesforceSessionManager.
Args:
domain: The Salesforce orgfarm domain URL.
agent_id: The identifier o... | 6 | 5 | 20 | 2 | 14 | 5 | 1 | 0.36 | 0 | 1 | 0 | 0 | 3 | 3 | 4 | 4 | 87 | 10 | 58 | 29 | 52 | 21 | 35 | 28 | 30 | 1 | 0 | 0 | 4 |
323,791 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/sap_executor.py | air.distiller.executor.sap_executor.SAPExecutor | import httpx
from air.types.distiller.executor.sap_config import SAPAgentConfig
import asyncio
from air.distiller.executor.executor import Executor
from typing import Any, Callable, Dict
class SAPExecutor(Executor):
"""
Executor class for SAP Agent.
"""
agent_class: str = 'SAPAgent'
def __init__(s... |
class SAPExecutor(Executor):
'''
Executor class for SAP Agent.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dict[str, Any], return_string: bool=True):
'''Initializes the SAP Executor.
... | 5 | 4 | 29 | 3 | 20 | 6 | 2 | 0.35 | 1 | 7 | 1 | 0 | 4 | 1 | 4 | 10 | 125 | 17 | 80 | 27 | 65 | 28 | 36 | 16 | 31 | 3 | 1 | 2 | 7 |
323,792 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/tool_executor.py | air.distiller.executor.tool_executor.ToolExecutor | import json
import inspect
from typing import Callable, Dict, Any, get_type_hints
import asyncio
from air.distiller.executor.executor import Executor
class ToolExecutor(Executor):
"""Executor class for ToolUseAgent.
Extends Executor to support multiple tool functions.
"""
agent_class: str = 'ToolUseAg... |
class ToolExecutor(Executor):
'''Executor class for ToolUseAgent.
Extends Executor to support multiple tool functions.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_config: Dict[str, Any], return_string: bool=True... | 3 | 3 | 83 | 9 | 56 | 19 | 10 | 0.35 | 1 | 13 | 0 | 0 | 2 | 1 | 2 | 8 | 174 | 21 | 113 | 33 | 100 | 40 | 72 | 19 | 69 | 11 | 1 | 5 | 19 |
323,793 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/vector_search_executor.py | air.distiller.executor.vector_search_executor.CustomVectorSearchExecutor | import asyncio
from air.distiller.executor.executor import Executor
from typing import Any, Callable, Dict
class CustomVectorSearchExecutor(Executor):
"""Executor class for ResearchAgent.
Extends Executor to support multiple retriever functions based on retriever types.
"""
agent_class: str = 'Resear... |
class CustomVectorSearchExecutor(Executor):
'''Executor class for ResearchAgent.
Extends Executor to support multiple retriever functions based on retriever types.
'''
def __init__(self, func: Dict[str, Callable], send_queue: asyncio.Queue, account: str, project: str, uuid: str, role: str, utility_con... | 4 | 4 | 54 | 8 | 32 | 14 | 6 | 0.45 | 1 | 12 | 0 | 0 | 3 | 1 | 3 | 9 | 173 | 29 | 99 | 27 | 85 | 45 | 68 | 16 | 64 | 8 | 1 | 4 | 18 |
323,794 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/executor/writer_executor.py | air.distiller.executor.writer_executor.WriterExecutor | from typing import Any, Callable, Dict
from httpx import Response
from air.distiller.executor.executor import Executor
from air.types.distiller.executor.writer_config import WriterAIAgentConfig
import os
import json
import requests
import asyncio
class WriterExecutor(Executor):
"""Executor class for Writer Web Age... |
class WriterExecutor(Executor):
'''Executor class for Writer Web Agent leveraging Writer AI's agent engines.
This class extends the generic `Executor` to provide functionality for interacting
with an Writer AI agent via its Web UI creation mode.
'''
def __init__(self, func: Dict[str, Callable], se... | 5 | 5 | 52 | 9 | 26 | 18 | 4 | 0.71 | 1 | 12 | 1 | 0 | 4 | 2 | 4 | 10 | 222 | 41 | 106 | 40 | 91 | 75 | 64 | 27 | 59 | 8 | 1 | 4 | 17 |
323,795 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/pii_handler/pii_handler.py | air.distiller.pii_handler.pii_handler.PIIHandler | import re
from pathlib import Path
from presidio_analyzer import AnalyzerEngine, RecognizerResult
import logging
from omegaconf import OmegaConf
from presidio_anonymizer import AnonymizerEngine, DeanonymizeEngine
from typing import Any, Dict, List, Optional, Tuple
class PIIHandler:
"""
A class for handling PII... |
class PIIHandler:
'''
A class for handling PII detection, masking, and demasking using Microsoft Presidio.
'''
def __init__(self, language: str='en', config_path: str='pii_handler.yaml') -> None:
'''
Initialize the PII handler.
Args:
language: Language to use fo... | 17 | 14 | 18 | 2 | 13 | 3 | 3 | 0.31 | 0 | 9 | 1 | 0 | 14 | 12 | 14 | 14 | 292 | 48 | 188 | 69 | 158 | 59 | 135 | 54 | 118 | 8 | 0 | 2 | 40 |
323,796 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/distiller/pii_handler/pii_handler.py | air.distiller.pii_handler.pii_handler.PIIMetadata | from pydantic import BaseModel
class PIIMetadata(BaseModel):
"""Model for PII masking metadata."""
mapping_key: str
original_text: str
entity_type: str
operator: str
start: int
end: int
placeholder: str |
class PIIMetadata(BaseModel):
'''Model for PII masking metadata.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 82 | 10 | 1 | 8 | 1 | 7 | 1 | 8 | 1 | 7 | 0 | 5 | 0 | 0 |
323,797 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/embeddings/client.py | air.embeddings.client.AsyncEmbeddingsClient | import aiohttp
from air.types import CreateEmbeddingResponse
from air import __version__
class AsyncEmbeddingsClient:
"""
An asynchronous client for the embedding create endpoint.
This class handles sending requests to the embedding create endpoint
and converts the responses into Pydantic models for t... |
class AsyncEmbeddingsClient:
'''
An asynchronous client for the embedding create endpoint.
This class handles sending requests to the embedding create endpoint
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: ... | 3 | 3 | 34 | 4 | 18 | 13 | 2 | 0.86 | 0 | 8 | 1 | 0 | 2 | 3 | 2 | 2 | 76 | 10 | 36 | 27 | 19 | 31 | 18 | 11 | 15 | 3 | 0 | 2 | 4 |
323,798 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/embeddings/client.py | air.embeddings.client.EmbeddingsClient | from air import __version__
from air.types import CreateEmbeddingResponse
import requests
class EmbeddingsClient:
"""
A synchronous client for the embedding create endpoint.
This class handles sending requests to the embedding create endpoint
and converts the responses into Pydantic models for type sa... |
class EmbeddingsClient:
'''
A synchronous client for the embedding create endpoint.
This class handles sending requests to the embedding create endpoint
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[st... | 3 | 3 | 34 | 4 | 18 | 13 | 2 | 0.86 | 0 | 6 | 1 | 0 | 2 | 3 | 2 | 2 | 77 | 11 | 36 | 25 | 19 | 31 | 16 | 11 | 13 | 3 | 0 | 1 | 4 |
323,799 | Accenture/airefinery-sdk | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/Accenture_airefinery-sdk/air/images/client.py | air.images.client.AsyncImagesClient | from air import __version__
import aiohttp
from air.types.constants import DEFAULT_TIMEOUT
from air.types import ImagesResponse, SegmentationResponse
class AsyncImagesClient:
"""
An asynchronous client for the image endpoint.
This class handles sending requests to the image endpoint
and converts the r... |
class AsyncImagesClient:
'''
An asynchronous client for the image endpoint.
This class handles sending requests to the image endpoint
and converts the responses into Pydantic models for type safety.
'''
def __init__(self, base_url: str, api_key: str, default_headers: dict[str, str] | None=None... | 4 | 4 | 46 | 6 | 25 | 15 | 2 | 0.67 | 0 | 10 | 2 | 0 | 3 | 3 | 3 | 3 | 147 | 22 | 75 | 45 | 47 | 50 | 31 | 17 | 27 | 3 | 0 | 2 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.