mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-11 07:15:08 -05:00
Compare commits
5 Commits
chore/comb
...
seer/fix-o
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a297333fd5 | ||
|
|
4cb42a2e9c | ||
|
|
b31d60276a | ||
|
|
b52e95e1fc | ||
|
|
f4ba02f2f1 |
@@ -55,6 +55,10 @@ class FirecrawlCrawlBlock(Block):
|
|||||||
change_tracking: dict[str, Any] = SchemaField(
|
change_tracking: dict[str, Any] = SchemaField(
|
||||||
description="The change tracking of the crawl"
|
description="The change tracking of the crawl"
|
||||||
)
|
)
|
||||||
|
error: str = SchemaField(
|
||||||
|
description="Error message if the crawl failed",
|
||||||
|
default="",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ class FirecrawlExtractBlock(Block):
|
|||||||
|
|
||||||
class Output(BlockSchema):
|
class Output(BlockSchema):
|
||||||
data: dict[str, Any] = SchemaField(description="The result of the crawl")
|
data: dict[str, Any] = SchemaField(description="The result of the crawl")
|
||||||
|
error: str = SchemaField(
|
||||||
|
description="Error message if the extraction failed",
|
||||||
|
default="",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ class FirecrawlMapWebsiteBlock(Block):
|
|||||||
results: list[dict[str, Any]] = SchemaField(
|
results: list[dict[str, Any]] = SchemaField(
|
||||||
description="List of search results with url, title, and description"
|
description="List of search results with url, title, and description"
|
||||||
)
|
)
|
||||||
|
error: str = SchemaField(
|
||||||
|
description="Error message if the map failed",
|
||||||
|
default="",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ class FirecrawlScrapeBlock(Block):
|
|||||||
change_tracking: dict[str, Any] = SchemaField(
|
change_tracking: dict[str, Any] = SchemaField(
|
||||||
description="The change tracking of the crawl"
|
description="The change tracking of the crawl"
|
||||||
)
|
)
|
||||||
|
error: str = SchemaField(
|
||||||
|
description="Error message if the scrape failed",
|
||||||
|
default="",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -38,6 +38,10 @@ class FirecrawlSearchBlock(Block):
|
|||||||
class Output(BlockSchema):
|
class Output(BlockSchema):
|
||||||
data: dict[str, Any] = SchemaField(description="The result of the search")
|
data: dict[str, Any] = SchemaField(description="The result of the search")
|
||||||
site: dict[str, Any] = SchemaField(description="The site of the search")
|
site: dict[str, Any] = SchemaField(description="The site of the search")
|
||||||
|
error: str = SchemaField(
|
||||||
|
description="Error message if the search failed",
|
||||||
|
default="",
|
||||||
|
)
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
@@ -315,6 +315,11 @@ async def get_recommended_agents(user_id: str) -> list[StoreAgentDetails]:
|
|||||||
agent_points.sort(key=lambda x: x[1], reverse=True)
|
agent_points.sort(key=lambda x: x[1], reverse=True)
|
||||||
recommended_agents = [agent for agent, _ in agent_points[:2]]
|
recommended_agents = [agent for agent, _ in agent_points[:2]]
|
||||||
|
|
||||||
|
# Only return agents if we have at least 2
|
||||||
|
# This prevents the frontend from trying to display a partial selection
|
||||||
|
if len(recommended_agents) < 2:
|
||||||
|
return []
|
||||||
|
|
||||||
return [
|
return [
|
||||||
StoreAgentDetails(
|
StoreAgentDetails(
|
||||||
store_listing_version_id=agent.storeListingVersionId,
|
store_listing_version_id=agent.storeListingVersionId,
|
||||||
|
|||||||
@@ -67,12 +67,15 @@ export default function Page() {
|
|||||||
agents[0]?.store_listing_version_id
|
agents[0]?.store_listing_version_id
|
||||||
: false
|
: false
|
||||||
}
|
}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
updateState({
|
if (agents[0]) {
|
||||||
selectedStoreListingVersionId: agents[0].store_listing_version_id,
|
updateState({
|
||||||
agentInput: {},
|
selectedStoreListingVersionId:
|
||||||
})
|
agents[0].store_listing_version_id,
|
||||||
}
|
agentInput: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
<OnboardingAgentCard
|
<OnboardingAgentCard
|
||||||
agent={agents[1]}
|
agent={agents[1]}
|
||||||
@@ -82,11 +85,14 @@ export default function Page() {
|
|||||||
agents[1]?.store_listing_version_id
|
agents[1]?.store_listing_version_id
|
||||||
: false
|
: false
|
||||||
}
|
}
|
||||||
onClick={() =>
|
onClick={() => {
|
||||||
updateState({
|
if (agents[1]) {
|
||||||
selectedStoreListingVersionId: agents[1].store_listing_version_id,
|
updateState({
|
||||||
})
|
selectedStoreListingVersionId:
|
||||||
}
|
agents[1].store_listing_version_id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user