Version 1.16.0
4 months ago by Tech admin
What's New? 🆕
Application type - ‼️Braking changes‼️
We are introducing application types, which will now include two options:
- AI Assistant Retrieval: This application type is chain-based, facilitating connections to a single data source for quick, context-specific responses. It significantly enhances response times for retrieval tasks.
- Advanced Agent: Designed as an agent-based application, it allows connections to multiple tools, enabling users to conduct complex tasks. Users can ask specific questions related to a tool or general inquiries.
Breaking Changes in the UI:
- All applications currently developed in SW will automatically transition to "Advanced Agent" type apps. This change will not affect existing configurations or related information, such as conversation datasets or feedback events.
- The "Application Context," currently only including "Knowledge," will be updated to the "SW Knowledge" tool within an "Advanced Agent" application.
Breaking Changes in the SDK:
Application creation and updates will now require specifying an application type, reflecting this new categorization. These updates aim to refine functionality and improve the user experience across both UI and SDK interactions.
Create AI Assistant Retrieval app
from superwise_api.models.tool.tool import ToolConfigSQLDatabasePostgres
from superwise_api.models.context.context import ContextDef
from superwise_api.models.application.application import AIAssistantConfig
db_context = ContextDef(name="My DB", config=ToolConfigSQLDatabasePostgres(connection_string="My connection string"))
app = sw.application.create(name="application name", additional_config=AIAssistantConfig(context=db_context) ,llm_model=llm_model, prompt=None)
Create Advances Agent app:
from superwise_api.models.application.application import OpenAIModel,OpenAIModelVersion,AdvancedAgentConfig
app = sw.application.create(
name="My Application name",
additional_config=AdvancedAgentConfig(tools=[tool_1, tool_2]),
llm_model=llm_model,
prompt=None
)
Update application:
app = sw.application.put(str(app.id),
additional_config=AdvancedAgentConfig(tools=[tool_1, tool_2]),
llm_model=llm_model,
prompt=None,
name="Application name"
)
Add knowledge tool:
from superwise_api.models.tool.tool import ToolDef
from superwise_api.models.tool.tool import ToolConfigKnowledge
from superwise_api.models.application.application import AdvancedAgentConfig
knowledge = sw.knowledge.get_by_id(knowledge_id="knowledge_id")
knowledge_tool = ToolDef(name="Name",
description="Description",
config=ToolConfigKnowledge(knowledge_id=str(knowledge.id),
knowledge_metadata=knowledge.knowledge_metadata,
embedding_model=knowledge.embedding_model))
app = sw.application.put(str(app.id),
additional_config=AdvancedAgentConfig(tools=[knowledge_tool]),
llm_model=llm_model,
prompt=None,
name="Application name",
show_cites = True
)
Introducing New Model Provider - Anthropic!
We're pleased to announce the addition of Anthropic to our list of model providers. To get started, simply select the Anthropic model from the available options and enter your API key.
Bug Fixes 🐛
- Improved accessibility by providing identification details as part of headers in scraping request