Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default option for observer #1411

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
16 changes: 7 additions & 9 deletions skyvern-frontend/src/routes/tasks/create/PromptBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ const exampleCases = [
function PromptBox() {
const navigate = useNavigate();
const [prompt, setPrompt] = useState<string>("");
const [selectValue, setSelectValue] = useState(
observerFeatureEnabled ? "v2" : "v1",
);
const [selectValue, setSelectValue] = useState("v1");
const credentialGetter = useCredentialGetter();
const queryClient = useQueryClient();

Expand Down Expand Up @@ -241,23 +239,23 @@ function PromptBox() {
<SelectValue />
</SelectTrigger>
<SelectContent className="border-slate-500 bg-slate-elevation3">
<CustomSelectItem value="v2" className="hover:bg-slate-800">
<CustomSelectItem value="v1">
<div className="space-y-2">
<div>
<SelectItemText>Skyvern 2.0 (Observer)</SelectItemText>
<SelectItemText>Skyvern 1.0 (Tasks)</SelectItemText>
</div>
<div className="text-xs text-slate-400">
best for complex tasks
best for simple tasks
</div>
</div>
</CustomSelectItem>
<CustomSelectItem value="v1">
<CustomSelectItem value="v2" className="hover:bg-slate-800">
<div className="space-y-2">
<div>
<SelectItemText>Skyvern 1.0 (Tasks)</SelectItemText>
<SelectItemText>Skyvern 2.0 (Observer)</SelectItemText>
</div>
<div className="text-xs text-slate-400">
best for simple tasks
best for complex tasks
</div>
</div>
</CustomSelectItem>
Expand Down
6 changes: 0 additions & 6 deletions skyvern/forge/sdk/db/id.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
TASK_GENERATION_PREFIX = "tg"
OBSERVER_CRUISE_ID = "oc"
OBSERVER_THOUGHT_ID = "ot"
PERSISTENT_BROWSER_SESSION_ID = "pbs"


def generate_workflow_id() -> str:
Expand Down Expand Up @@ -154,11 +153,6 @@ def generate_observer_thought_id() -> str:
return f"{OBSERVER_THOUGHT_ID}_{int_id}"


def generate_persistent_browser_session_id() -> str:
int_id = generate_id()
return f"{PERSISTENT_BROWSER_SESSION_ID}_{int_id}"


def generate_id() -> int:
"""
generate a 64-bit int ID
Expand Down
13 changes: 0 additions & 13 deletions skyvern/forge/sdk/db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
generate_org_id,
generate_organization_auth_token_id,
generate_output_parameter_id,
generate_persistent_browser_session_id,
generate_step_id,
generate_task_generation_id,
generate_task_id,
Expand Down Expand Up @@ -541,15 +540,3 @@ class ObserverThoughtModel(Base):

created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)


class PersistentBrowserSessionModel(Base):
__tablename__ = "persistent_browser_sessions"

persistent_browser_session_id = Column(String, primary_key=True, default=generate_persistent_browser_session_id)
organization_id = Column(String, ForeignKey("organizations.organization_id"), nullable=False)
runnable_type = Column(String, nullable=False)
runnable_id = Column(String, nullable=False)
created_at = Column(DateTime, default=datetime.datetime.utcnow, nullable=False)
modified_at = Column(DateTime, default=datetime.datetime.utcnow, onupdate=datetime.datetime.utcnow, nullable=False)
deleted_at = Column(DateTime, nullable=True)
Loading