Dustin on Nostr: It’s interesting how actions are chosen across different LLM agents. Judging from ...
It’s interesting how actions are chosen across different LLM agents.
Judging from the description on OpenAI's website, the decision of which function (aka tool) to use is decided by the model (i.e. GPT4) based on the user’s incoming message and chat (thread) history.
“In this example, we define a single function get_current_weather. The model calls the function multiple times, and after sending the function response back to the model, we let it decide the next step. It responded with a user-facing message which was telling the user the temperature in San Francisco, Tokyo, and Paris. Depending on the query, it may choose to call a function again.
If you want to force the model to call a specific function you can do so by setting tool_choice with a specific function name. You can also force the model to generate a user-facing message by setting tool_choice: "none". Note that the default behavior (tool_choice: "auto") is for the model to decide on its own whether to call a function and if so which function to call.”
See
https://platform.openai.com/docs/guides/function-callingPublished at
2024-01-06 07:14:44Event JSON
{
"id": "6ee79699ff2347fd978d89decc9aa6984dc2aee8e5a22c95ed236e32d2dd8130",
"pubkey": "da18e9860040f3bf493876fc16b1a912ae5a6f6fa8d5159c3de2b8233a0d9851",
"created_at": 1704525284,
"kind": 1,
"tags": [],
"content": "It’s interesting how actions are chosen across different LLM agents.\n\nJudging from the description on OpenAI's website, the decision of which function (aka tool) to use is decided by the model (i.e. GPT4) based on the user’s incoming message and chat (thread) history. \n\n“In this example, we define a single function get_current_weather. The model calls the function multiple times, and after sending the function response back to the model, we let it decide the next step. It responded with a user-facing message which was telling the user the temperature in San Francisco, Tokyo, and Paris. Depending on the query, it may choose to call a function again.\n\nIf you want to force the model to call a specific function you can do so by setting tool_choice with a specific function name. You can also force the model to generate a user-facing message by setting tool_choice: \"none\". Note that the default behavior (tool_choice: \"auto\") is for the model to decide on its own whether to call a function and if so which function to call.”\n\nSee https://platform.openai.com/docs/guides/function-calling",
"sig": "465dc4e7ca91375656ea8f8bebfa37a01ec381a32d07a350b35224680135e812be86fcae58b6881ca39270deeb91c815fcb232932075deef442b8231e0ca78fb"
}