Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a7ac7ad
ENG-1852: Hotfix, added fail-fast option (#488)
kadirpekel Apr 11, 2025
b0887bd
Fix: BUG-503 failed to update utility tool after get (#491)
ahmetgunduz Apr 16, 2025
89daf2f
Bug-503-fix Update (#493)
ahmetgunduz Apr 16, 2025
6bf7d00
ENG-1920: added sentry cred (#476)
xainaz Apr 16, 2025
9e2b03c
Read input variables correctly (#496)
thiago-aixplain Apr 17, 2025
409a893
Fix: file not deleted in test_sql_tool_with_csv test (#492)
ahmetgunduz Apr 17, 2025
3acfacd
ENG-2007: Fix agent and team agent parametrized functional test - Syn…
lucas-aixplain Apr 17, 2025
da7ec38
ENG-1789: Add multiple index backbones support (#443)
basitanees Apr 23, 2025
d360780
ENG-2049: rename air functions (#500)
thiago-aixplain Apr 24, 2025
24e88da
ENG 1924: aixplain sdk new test cases for agents using utility and pi…
OsujiCC Apr 24, 2025
044d8d8
add pydantic requirement (#502)
basitanees Apr 25, 2025
4efdbc8
ENG-1978: Adding instructions to teams (#485)
thiago-aixplain Apr 25, 2025
ab2fcc5
BUG-504: Merged paramMappings for the same link vectors (#499)
kadirpekel Apr 25, 2025
268cc1a
ENG-1836: Set name of tools on the SDK (#501)
thiago-aixplain Apr 28, 2025
9796d19
Eng 2051 Improvements on CI flow (#509)
kadirpekel Apr 30, 2025
f0837fc
Add a finetuned version of BGE model (#512)
Muhammad-Elmallah May 5, 2025
511bf5f
ENG-2055-Aixplain-SDK-Centralized-Error-Handling (#510)
ahmetgunduz May 6, 2025
0c4edf4
ENG-1862:Added status to Tools and deployment check for Agent and Tea…
ahmetgunduz May 6, 2025
0989c51
Merge branch 'test' into development
hadi-aix May 8, 2025
84baed8
Fix: BUG-543 SQL Tool upload db issue (#519)
ahmetgunduz May 9, 2025
de6a1c4
ENG-2028: model streaming (#506)
thiago-aixplain May 9, 2025
b909a54
BUG-542-Utility-Model-Update-Test-Failing-in-SDK (#515)
ahmetgunduz May 9, 2025
8aa3d31
ENG-2115 fixing agent tests (#522)
thiago-aixplain May 9, 2025
4f20c65
Merge branch 'test' into development
thiago-aixplain May 9, 2025
87d5791
ENG-1551 ai xplain sdk caching onboarded models pipelines and agents …
xainaz May 12, 2025
6f600d9
Bug 531: standardize asset names (#521)
OsujiCC May 14, 2025
85d0406
fixed asset issue (#526)
xainaz May 15, 2025
4d650c9
Make functional test more stable (#525)
thiago-aixplain May 15, 2025
91d6864
ENG-2100: Enable JSON schema as output format (#513)
thiago-aixplain May 19, 2025
cecd3a6
Added serialize function for save (#529)
xainaz May 20, 2025
6aa648f
Add Embedding Params to Model (#534)
basitanees May 20, 2025
ad4ddbf
Prod 1785 enable adding any embedding in ai r not just embedding mode…
Muhammad-Elmallah May 21, 2025
bb74b68
Changed cache default to false (#536)
xainaz May 22, 2025
e3f072d
Merge branch 'test' into development
thiago-aixplain May 22, 2025
b2a00e3
added filelock (#538)
xainaz May 23, 2025
239b56a
Add filelock to requirements (#540)
thiago-aixplain May 23, 2025
1f6b614
cache duration (#541)
xainaz May 23, 2025
14485e2
ErrorCode returns code in string (#542)
yunsukim86 May 26, 2025
59be7cc
ENG-2003 : Add LLM's to Agents as Object (#524)
ahmetgunduz May 27, 2025
cdaaa81
ENG-2105: persist sql data (#528)
thiago-aixplain May 27, 2025
77ff8d8
Custom inspector interface (#484)
yunsukim86 Jun 2, 2025
f6422db
Eng 2040 ai r 2 add splitting features to the sdk (#546)
Muhammad-Elmallah Jun 2, 2025
59e40d6
pipeline to_dict change + fixed circular imports pipeline functional …
xainaz Jun 2, 2025
c8aa11c
ENG-1962: composio (#547)
thiago-aixplain Jun 4, 2025
b7a929d
Add input target for inspectors (#548)
yunsukim86 Jun 6, 2025
6067f16
ENG-1900 Refined agent deletion error messages (#543)
kadirpekel Jun 10, 2025
c570a70
ENG-2271: Add code interpreter model ID (#550)
lucas-aixplain Jun 16, 2025
80ddb8a
Update enums.py (#552)
hadi-aix Jun 18, 2025
39be1d0
Update enums.py (#554)
hadi-aix Jun 18, 2025
c45b709
Merge branch 'test' into development
hadi-aix Jun 18, 2025
095f9b8
removed pipeline cache test (#556)
xainaz Jun 19, 2025
01a7f9e
Functional test fix of agent in use error (#560)
ahmetgunduz Jun 20, 2025
585444a
BUG-574 Fixed functionType type handling (#561)
kadirpekel Jun 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aixplain/enums/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
from .asset_status import AssetStatus
from .index_stores import IndexStores
from .function_type import FunctionType
from .code_interpeter import CodeInterpreterModel
10 changes: 10 additions & 0 deletions aixplain/enums/code_interpeter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from enum import Enum


class CodeInterpreterModel(str, Enum):
"""Code Interpreter Model IDs"""

PYTHON_AZURE = "67476fa16eb563d00060ad62"

def __str__(self):
return self._value_
1 change: 1 addition & 0 deletions aixplain/enums/function_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ class FunctionType(Enum):
SEARCH = "search"
INTEGRATION = "connector"
CONNECTION = "connection"
MCPSERVER = 'mcpserver'
5 changes: 5 additions & 0 deletions aixplain/factories/index_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ def validate_embedding_model(model_id) -> bool:
return model.function == Function.TEXT_EMBEDDING


def validate_embedding_model(model_id) -> bool:
model = ModelFactory.get(model_id)
return model.function == Function.TEXT_EMBEDDING


class IndexFactory(ModelFactory, Generic[T]):
@classmethod
def create(
Expand Down
2 changes: 0 additions & 2 deletions aixplain/factories/model_factory/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
from aixplain.factories.model_factory.mixins import ModelGetterMixin, ModelListMixin
from typing import Callable, Dict, List, Optional, Text, Union



class ModelFactory(ModelGetterMixin, ModelListMixin):
"""A static class for creating and exploring Model Objects.

Expand Down
1 change: 0 additions & 1 deletion aixplain/factories/model_factory/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def create_model_from_response(response: Dict) -> Model:
supports_streaming=response.get("supportsStreaming", False),
status=status,
function_type=function_type,

**additional_kwargs,
)

Expand Down
3 changes: 3 additions & 0 deletions aixplain/modules/agent/tool/custom_python_code_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from aixplain.modules.agent.tool import Tool
import logging
from aixplain.enums import AssetStatus
from aixplain.enums.code_interpeter import CodeInterpreterModel


class CustomPythonCodeTool(Tool):
Expand All @@ -37,11 +38,13 @@ def __init__(
super().__init__(name=name or "", description=description, **additional_info)
self.code = code
self.status = AssetStatus.ONBOARDED # TODO: change to DRAFT when we have a way to onboard the tool
self.id = CodeInterpreterModel.PYTHON_AZURE

self.validate()

def to_dict(self):
return {
"id": self.id,
"name": self.name,
"description": self.description,
"type": "utility",
Expand Down
4 changes: 0 additions & 4 deletions aixplain/modules/model/index_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from enum import Enum
from typing import List
from aixplain.enums.splitting_options import SplittingOptions

import os

from urllib.parse import urljoin
Expand Down Expand Up @@ -56,8 +55,6 @@ def __init__(
self.split_length = split_length
self.split_overlap = split_overlap



class IndexModel(Model):
def __init__(
self,
Expand Down Expand Up @@ -125,7 +122,6 @@ def to_dict(self) -> Dict:
data["collection_type"] = self.version.split("-", 1)[0]
return data


def search(self, query: str, top_k: int = 10, filters: List[IndexFilter] = []) -> ModelResponse:
"""Search for documents in the index

Expand Down
3 changes: 1 addition & 2 deletions aixplain/modules/pipeline/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ def save(self, *args, **kwargs):

def to_dict(self) -> dict:
return self.serialize()



11 changes: 1 addition & 10 deletions aixplain/modules/pipeline/designer/enums.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from enum import Enum

from aixplain.enums import FunctionType

class RouteType(str, Enum):
CHECK_TYPE = "checkType"
Expand Down Expand Up @@ -29,15 +29,6 @@ class NodeType(str, Enum):
class AssetType(str, Enum):
MODEL = "MODEL"


class FunctionType(str, Enum):
AI = "ai"
SEGMENTOR = "segmentor"
RECONSTRUCTOR = "reconstructor"
UTILITY = "utility"
METRIC = "metric"


class ParamType:
INPUT = "INPUT"
OUTPUT = "OUTPUT"
7 changes: 6 additions & 1 deletion aixplain/modules/pipeline/designer/nodes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import List, Union, Type, TYPE_CHECKING, Optional
from enum import Enum

from aixplain.modules import Model
from aixplain.enums import DataType, Function
Expand Down Expand Up @@ -142,7 +143,11 @@ def serialize(self) -> dict:
obj["supplier"] = self.supplier
obj["version"] = self.version
obj["assetType"] = self.assetType
obj["functionType"] = self.functionType
# Handle functionType as enum or string
if isinstance(self.functionType, Enum):
obj["functionType"] = self.functionType.value
else:
obj["functionType"] = self.functionType
obj["type"] = self.type
return obj

Expand Down
2 changes: 0 additions & 2 deletions aixplain/utils/asset_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
CACHE_DURATION = 86400



@dataclass
class Store(Generic[T]):
data: Dict[str, T]
Expand Down Expand Up @@ -62,7 +61,6 @@ def compute_expiry(self):
del os.environ["CACHE_EXPIRY_TIME"]
expiry = CACHE_DURATION


return time.time() + int(expiry)

def invalidate(self):
Expand Down
1 change: 0 additions & 1 deletion aixplain/utils/cache_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def get_cache_expiry():
return int(os.getenv("CACHE_EXPIRY_TIME", CACHE_DURATION))



def save_to_cache(cache_file, data, lock_file):
try:
os.makedirs(os.path.dirname(cache_file), exist_ok=True)
Expand Down
15 changes: 10 additions & 5 deletions tests/functional/agent/agent_functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import copy
import json
import os
import re
from dotenv import load_dotenv

load_dotenv()
Expand Down Expand Up @@ -234,7 +235,10 @@ def test_delete_agent_in_use(delete_agents_and_team_agents, AgentFactory):

with pytest.raises(Exception) as exc_info:
agent.delete()
assert str(exc_info.value) == "Agent Deletion Error (HTTP 403): err.agent_is_in_use."
assert re.match(
r"Error: Agent cannot be deleted\.\nReason: This agent is currently used by one or more team agents\.\n\nteam_agent_id: [a-f0-9]{24}\. To proceed, remove the agent from all team agents before deletion\.",
str(exc_info.value),
)


@pytest.mark.parametrize("AgentFactory", [AgentFactory, v2.Agent])
Expand Down Expand Up @@ -302,7 +306,7 @@ def test_update_tools_of_agent(run_input_map, delete_agents_and_team_agents, Age
"type": "translation",
"supplier": "Microsoft",
"function": "translation",
"query": "Translate: Olá, como vai você?",
"query": "Translate: 'Olá, como vai você?'",
"description": "Translation tool with target language",
"expected_tool_input": "targetlanguage",
},
Expand Down Expand Up @@ -334,7 +338,7 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
# Create and run agent
agent = AgentFactory.create(
name="Test Parameter Agent",
description="Test agent with parameterized tools. You MUST use a tool for the tasks.",
description="Test agent with parameterized tools. You MUST use a tool for the tasks. Do not directly answer the question.",
tools=[tool],
llm_id="6646261c6eb563165658bbb1", # Using LLM ID from test data
)
Expand All @@ -351,8 +355,9 @@ def test_specific_model_parameters_e2e(tool_config, delete_agents_and_team_agent
# Verify tool was used in execution
assert len(response["data"]["intermediate_steps"]) > 0
tool_used = False

for step in response["data"]["intermediate_steps"]:
if tool_config["expected_tool_input"] in step["tool_steps"][0]["input"]:
if len(step["tool_steps"]) > 0 and tool_config["expected_tool_input"] in step["tool_steps"][0]["input"]:
tool_used = True
break
assert tool_used, "Tool was not used in execution"
Expand Down Expand Up @@ -643,6 +648,7 @@ def test_agent_llm_parameter_preservation(delete_agents_and_team_agents, AgentFa
# Reset the LLM temperature to its original value
llm.temperature = original_temperature


def test_run_agent_with_expected_output():
from pydantic import BaseModel
from typing import Optional, List
Expand Down Expand Up @@ -753,4 +759,3 @@ def test_agent_with_action_tool():
assert "helsinki" in response.data.output.lower()
assert "SLACK_CHAT_POST_MESSAGE" in [step["tool"] for step in response.data.intermediate_steps[0]["tool_steps"]]
connection.delete()

23 changes: 0 additions & 23 deletions tests/functional/pipelines/create_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
limitations under the License.
"""
import os
from aixplain.utils.cache_utils import CACHE_FOLDER
from aixplain.modules.pipeline import Pipeline
import json
import pytest
Expand Down Expand Up @@ -79,25 +78,3 @@ def test_create_pipeline_wrong_path(PipelineFactory):
with pytest.raises(Exception):
PipelineFactory.create(name=pipeline_name, pipeline="/")



@pytest.mark.parametrize("PipelineFactory", [PipelineFactory])
def test_pipeline_cache_creation(PipelineFactory):
cache_file = os.path.join(CACHE_FOLDER, "pipelines.json")
if os.path.exists(cache_file):
os.remove(cache_file)

pipeline_json = "tests/functional/pipelines/data/pipeline.json"
pipeline_name = str(uuid4())
pipeline = PipelineFactory.create(name=pipeline_name, pipeline=pipeline_json)

assert os.path.exists(cache_file), "Pipeline cache file was not created!"

with open(cache_file, "r") as f:
cache_data = json.load(f)

assert "data" in cache_data, "Cache format invalid, missing 'data'."

pipeline.delete()
if os.path.exists(cache_file):
os.remove(cache_file)