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

Add invalid endpoint #15

Merged
merged 2 commits into from
Oct 23, 2024
Merged

Add invalid endpoint #15

merged 2 commits into from
Oct 23, 2024

Conversation

kongzii
Copy link
Collaborator

@kongzii kongzii commented Oct 11, 2024

No description provided.

)


class ResponseCache(Generic[ResponseCacheModelVar, ResponseCacheSQLModelVar]):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is 100% reusable by both insights and invalid endpoint, so I made it a generic

return MarketInsightResult(url=tavily_result.url, title=tavily_result.title)


class MarketInsightsResponse(ResponseCacheModel):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are mostly copy-pasted, but they inherit from the new generic classes

@kongzii kongzii merged commit 6ee0103 into main Oct 23, 2024
7 checks passed
@kongzii kongzii deleted the peter/invalids branch October 23, 2024 07:13
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.

2 participants