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

feat(integration): Adding Business Analysis Integration #295

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

abhifetch
Copy link
Collaborator

No description provided.

@abhifetch abhifetch changed the title feat(int): Adding Business Analysis Integration feat(integration): Adding Business Analysis Integration Mar 21, 2024
Comment on lines +86 to +96
ctx.logger.info(msg.company_name)
symbol = await fetch_symbol(msg.company_name)
ctx.logger.info(symbol)
financial_data = await fetch_financial_data(symbol)
ctx.logger.info(financial_data)
polarity, subjectivity, news_content = await analyze_news(msg.company_name)
ctx.logger.info(news_content)
analysis = await generate_analysis(financial_data, (polarity, subjectivity), news_content)
ctx.logger.info(analysis)
await ctx.send(sender, UAgentResponse(message=analysis, type=UAgentResponseType.FINAL))

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion:
@abhifetch, we can utilize the agent storage as a cache. This way, we can minimize API calls and receive instant responses.

ctx.storage.set(company_name, analysis)

Copy link
Collaborator Author

@abhifetch abhifetch Mar 21, 2024

Choose a reason for hiding this comment

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

@gautamgambhir97 Yes that's a good idea, we can do it for financial idea, but news keeps on changing. let me check if I can do it for company name and financial details.

@devjsc devjsc merged commit 2920c74 into fetchai:main Apr 16, 2024
10 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.

3 participants