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

Get Summary API for Frontend User #18

Merged
merged 5 commits into from
Aug 14, 2023
Merged

Get Summary API for Frontend User #18

merged 5 commits into from
Aug 14, 2023

Conversation

YLee2121
Copy link
Collaborator

@YLee2121 YLee2121 commented Aug 12, 2023

Get Summary API

Summary

Input a ticker name from the front, the API will provide five article links and the corresponding five summaries.

Refactor Crawler.py and also revise the return variable, adding link as return.

Attention

  • @tejkoiejgns ModelAPI.main()

    ModelAPI.main() should take an input, the article texts. Check the code and you will see what I mean.

  • @Weirdojord Crawler.main()

    Crawler.main() should also return the corresponding five links. Each of your get_article sub-function has a return links, but in the main(), it doesn't return the links. I wanted you to organize the Crawler.py script to satisfy the needs of the API in this PR.

link_list = []
summary_list = []

link_list, raw_article_list = Crawler.main(ticker)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Weirdojord

Crawler.main() should also return the link. You need to adjust your code in Crawler.py

openai.api_key = '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'

#article_texts = Crawler.main()
def main(article_texts):
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tejkoiejgns

This function should input the articles and return the summaries.

No action is needed at this PR, just notify you simply.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@YLee2121 YLee2121 marked this pull request as ready for review August 12, 2023 22:51
Copy link
Collaborator

@alex308248 alex308248 left a comment

Choose a reason for hiding this comment

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

Clear and easy understanding refactor!

@YLee2121 YLee2121 self-assigned this Aug 14, 2023
@YLee2121 YLee2121 added enhancement New feature or request refactory Refactor the code labels Aug 14, 2023
@YLee2121 YLee2121 merged commit e8ef826 into main Aug 14, 2023
@YLee2121 YLee2121 mentioned this pull request Aug 14, 2023
@YLee2121 YLee2121 deleted the kyle/integrateBackend branch August 17, 2023 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactory Refactor the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants