-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
🥥 Content Refresher Agent #1146
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi 👋 We couldn't create a preview environment for this pull-request 😥 You can see your environment build logs here. Please double-check your If you need help, email us at contact@getergomake.com or join Discord. Click here to disable Ergomake. |
platform/reworkd_platform/schemas/workflow/blocks/agents/content_refresher_agent.py
Outdated
Show resolved
Hide resolved
def add_info(target: str, info: str) -> str: | ||
# Claude: rewrite target to include the info | ||
prompt = f"Below are notes from some SOURCE articles:\n{info}\n----------------\nBelow is the TARGET article:\n{target}\n----------------\nPlease rewrite the TARGET article to include the information from the SOURCE articles." | ||
response = claude.completions.create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth it to create some abstraction over claude models or even just use langchain so we have retries with exponentail backoff, etc for prod
response = requests.post( | ||
f"https://google.serper.dev/search", | ||
headers={ | ||
"X-API-KEY": settings.serp_api_key or '', | ||
"Content-Type": "application/json", | ||
}, | ||
params={ | ||
"q": search_query, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should wrap this into a client abstraction and reuse across the app. Can be a separate ticket
Added an agent that accepts a URL for an article and returns the content of the article along with a version of the article that has been refreshed from additional relevant sources found on the web