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

🌊 Stream responses for task execution #631

Merged
merged 23 commits into from
May 30, 2023
Merged

🌊 Stream responses for task execution #631

merged 23 commits into from
May 30, 2023

Conversation

asim-shrestha
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented May 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 8:45pm
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 30, 2023 8:45pm

@vercel vercel bot temporarily deployed to Preview – docs May 30, 2023 20:17 Inactive
@vercel vercel bot temporarily deployed to Preview – docs May 30, 2023 20:25 Inactive
@asim-shrestha asim-shrestha changed the title 🌊 Streaming [WIP] 🌊 Stream responses for task execution May 30, 2023
@awtkns awtkns self-requested a review May 30, 2023 20:26
(text) => {
result += text;
executionMessage.info += result;
console.log(executionMessage.info);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

const oldMessage = state.messages.find((message) => message.id === newMessage.id);
if (oldMessage) {
const updatedMessages = state.messages.map((message) => {
return message.id === oldMessage.id ? newMessage : message;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be a braceless arrow func

@@ -68,7 +69,7 @@ async def execute_task_agent(
goal: str,
task: str,
analysis: Analysis,
) -> str:
) -> StreamingResponse:
print("Execution analysis:", analysis)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be loguru in the future

@@ -68,7 +72,9 @@ async def call(self, goal: str, task: str, input_str: str) -> str:
answer_values.append(", ".join(answer_box.get("snippetHighlighted")))

if len(answer_values) > 0:
return "\n".join(answer_values)
print("ANSWERING")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove me

@vercel vercel bot temporarily deployed to Preview – docs May 30, 2023 20:45 Inactive
@asim-shrestha asim-shrestha merged commit 7032a1b into main May 30, 2023
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants