@@ -40,6 +40,12 @@ fun main() = runBlocking {
4040 executor = simpleOllamaAIExecutor(),
4141 // llmModel = OpenAIModels.Chat.GPT4o,
4242 // llmModel = GoogleModels.Gemini1_5Pro,
43+ systemPrompt = """
44+ You an AI assistant specialising in providing information about global climate emissions.
45+ Pass the list of countries and the year to the get-emissions MCP tool to get climate emission information.
46+ Use 3 letter country codes.
47+ Use units of millions for the emissions data.
48+ """ ,
4349 llmModel = model,
4450 toolRegistry = createToolSetRegistry()
4551 ) {
@@ -50,23 +56,17 @@ fun main() = runBlocking {
5056 onAgentRunError { eventContext ->
5157 println (" An error occurred: ${eventContext.throwable.message} \n ${eventContext.throwable.stackTraceToString()} " )
5258 }
53- onAgentFinished { eventContext ->
54- println (" Agent finished with result: ${eventContext.result} " )
55- }
5659 }
5760 }
5861
5962
6063 val output = agent.run (
6164 """
62- Get emission data for France and Germany for 2023 and 2024.
63- Also break down by sector.
64- Use 3 letter country codes.
65- Use units of millions for the emissions data.
66- """ .trimIndent()
65+ Get per capita emission data for France, Germany and Spain for the year 2024.
66+ Results should include full country name, country code, total emissions, population and per capita emissions.
67+ """
6768 )
68-
69- println (output)
69+ println (" Result = $output " )
7070}
7171
7272
0 commit comments