Skip to content

Commit

Permalink
✨ Random fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
asim-shrestha committed Nov 1, 2023
1 parent b94b1ad commit f9ec516
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 21 deletions.
1 change: 0 additions & 1 deletion next/src/services/agent/agent-work/analyze-task-work.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default class AnalyzeTaskWork implements AgentWork {
constructor(private parent: AutonomousAgent, private task: Task) {}

run = async () => {
this.parent.api.saveMessages([this.parent.messageService.startTaskMessage(this.task)]);
this.task = this.parent.model.updateTaskStatus(this.task, "executing");
this.analysis = await this.parent.api.analyzeTask(this.task.value);
};
Expand Down
1 change: 0 additions & 1 deletion next/src/services/agent/autonomous-agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class AutonomousAgent {
if (this.model.getLifecycle() !== "running") return;

// Done with everything in the log and all queued tasks
this.messageService.sendCompletedMessage();
this.stopAgent();
}

Expand Down
18 changes: 0 additions & 18 deletions next/src/services/agent/message-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ export class MessageService {
return message;
};

startTaskMessage = (task: Task) =>
this.sendMessage({
type: "system",
value: `✨ Starting task: ${task.value}`,
});

skipTaskMessage = (task: Task) =>
this.sendMessage({
type: "system",
Expand All @@ -48,18 +42,6 @@ export class MessageService {

sendGoalMessage = (goal: string) => this.sendMessage({ type: MESSAGE_TYPE_GOAL, value: goal });

sendManualShutdownMessage = () =>
this.sendMessage({
type: MESSAGE_TYPE_SYSTEM,
value: translate("AGENT_MANUALLY_SHUT_DOWN", "errors"),
});

sendCompletedMessage = () =>
this.sendMessage({
type: MESSAGE_TYPE_SYSTEM,
value: translate("ALL_TASKS_COMPLETETD", "errors"),
});

sendAnalysisMessage = (analysis: Analysis) => {
let message = "⏰ Generating response...";
if (analysis.action == "search") {
Expand Down
6 changes: 5 additions & 1 deletion platform/reworkd_platform/web/api/agent/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ async def summarize(
async def chat(
req_body: AgentChat = Depends(agent_chat_validator),
agent_service: AgentService = Depends(
get_agent_service(validator=agent_chat_validator, streaming=True),
get_agent_service(
validator=agent_chat_validator,
streaming=True,
llm_model="gpt-3.5-turbo-16k",
),
),
) -> FastAPIStreamingResponse:
return await agent_service.chat(
Expand Down

0 comments on commit f9ec516

Please sign in to comment.