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: intergration weather PluginTool #121

Closed
wants to merge 0 commits into from
Closed

Conversation

Yeaury
Copy link
Contributor

@Yeaury Yeaury commented Nov 21, 2024

Describe what this PR does / why we need it

add a plugin to get the weather

Does this pull request fix one issue?

#98

Describe how you did it

Describe how to verify it

Special notes for reviews

.defaultHeader(HttpHeaders.USER_AGENT,
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36")
.defaultHeader(HttpHeaders.ACCEPT,
"application/json, text/plain, */*")
Copy link
Contributor

Choose a reason for hiding this comment

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

Can be replaced with existing constants in spring

alibaba:
plugin:
weather:
api-key: ${AI_WEATHER_API_KEY}
Copy link
Contributor

Choose a reason for hiding this comment

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

image

add new line and check other files


private final ObjectMapper objectMapper = new ObjectMapper();

@Value("${spring.ai.alibaba.plugin.weather.api-key}")
Copy link
Contributor

Choose a reason for hiding this comment

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

pls see #112 (comment)

configuration can be injected like this

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