brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.85k stars 2.34k forks source link

AI Chat: Use conversation API - follow up to #37575 #39331

Closed kjozwiak closed 4 months ago

kjozwiak commented 4 months ago

Follow up from https://github.com/brave/brave-browser/issues/37575 for iOS. We disabled the Leo conversion API on iOS on 1.67.x as per https://github.com/brave/brave-browser/issues/39330. We'll need to be checked via 1.68.x.

Switch current API calls from the "anthropic-style" API to the conversation API. This API allows more structured response and request data in order to support future features such as annotations, search, etc.

Test Plan

The aim of this issue is not to add any new functionality provided by the conversation API but to switch over existing functions, which should be tested:

  • Simple messages (with and without page context)
  • Rewriting commands
  • Page summarization (text and video)
  • Suggested question retrieval When testing, make sure to use the feature param mentioned in https://github.com/brave/brave-core/pull/23067
kjozwiak commented 4 months ago

@hffvld @Uni-verse we'll need to wait for https://github.com/brave/brave-core/pull/24297 to get uplifted into 1.68.x before we can start running through the above.

Uni-verse commented 4 months ago

Verified on iPhone 12 running iOS 17.5.1 using version 1.68.115

Page summarize Simple messages Slash tools Brave search integration Suggested questions
IMG_6720 IMG_6716 IMG_6727 IMG_6726 IMG_6717
Uni-verse commented 4 months ago

Verified on iPad (7th Gen) running iPadOS 17.5.1 using version 1.68.115

Page summarize Simple messages Slash tools Brave search integration Suggested questions
IMG_1484 2 IMG_1490 IMG_1488 IMG_1483 2 IMG_1485 2