Add support for OpenAI built-in tools (web_search, code_interpreter)

Document the new tools feature in README, features.md, and providers.md.
Update the `!bai providers` command output to show vision/tools support
consistently for all providers.

Based on #62 by @yeslayla which migrated the OpenAI provider to the
Responses API.

See: https://github.com/etkecc/baibot/pull/62
This commit is contained in:
Slavi Pantaleev
2026-02-04 03:17:19 +02:00
parent c70387b0c3
commit d831c08306
6 changed files with 51 additions and 14 deletions

View File

@@ -109,11 +109,21 @@ pub fn help_provider_details(id: &str, info: &AgentProviderInfo) -> String {
let mut purpose_line = format!("{} {}", purpose.emoji(), purpose.as_str());
if let AgentPurpose::TextGeneration = purpose {
let mut extras = vec![];
if info.text_generation_supports_vision {
purpose_line = format!("{} ({})", purpose_line, "incl. vision");
extras.push("incl. vision");
} else {
purpose_line = format!("{} ({})", purpose_line, "no vision");
extras.push("no vision");
}
if info.text_generation_supports_tools {
extras.push("incl. tools");
} else {
extras.push("no tools");
}
purpose_line = format!("{} ({})", purpose_line, extras.join(", "));
}
capabilities.push(purpose_line);