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

🥥 Content Refresher Agent #1146

Merged
merged 5 commits into from
Jul 28, 2023
Merged

🥥 Content Refresher Agent #1146

merged 5 commits into from
Jul 28, 2023

Conversation

KhoomeiK
Copy link
Collaborator

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

@vercel
Copy link

vercel bot commented Jul 26, 2023

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

Name Status Preview Comments Updated (UTC)
agent-gpt ❌ Failed (Inspect) Jul 28, 2023 0:15am

@ergomake
Copy link

ergomake bot commented Jul 26, 2023

Hi 👋

We couldn't create a preview environment for this pull-request 😥

You can see your environment build logs here. Please double-check your docker-compose.yml file is valid.

If you need help, email us at contact@getergomake.com or join Discord.

Click here to disable Ergomake.

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(
Copy link
Contributor

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

Comment on lines 132 to 140
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,
},
Copy link
Contributor

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

@asim-shrestha asim-shrestha merged commit d030610 into main Jul 28, 2023
7 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