Commit f60c990
committed
Add OpenAI provider support
This change extends the LLM endpoint configuration system to support OpenAI as a new provider alongside existing Ollama and Anthropic options.
The assistant submodule has been updated to the latest revision with OpenAI support. The UI now exposes OpenAI as a selectable provider in the endpoint wizard, with appropriate default base URL (`https://api.openai.com`). Configuration logic has been updated to properly initialize OpenAI endpoints with required authentication headers.
A new provider constant `kClientTypeOpenAI` has been added to identify OpenAI endpoints. The endpoint data collection flow now correctly handles OpenAI configuration, including API key and max tokens settings. API key input is now properly enabled for OpenAI providers.
Additionally, a method signature correction was made to `CanRunTool` to accept tool arguments, and the callback registration was fixed from a typo (`SetTookInvokeCallback` to `SetToolInvokeCallback`).
* UI wizard and provider choice display
* LLM manager provider constants and endpoint configuration
* Endpoint data handling for OpenAI
* Tool callback registration and signature
**Generated by CodeLite**
Signed-off-by: Eran Ifrah <eran@codelite.org>1 parent bf6820c commit f60c990
File tree
6 files changed
+25
-9
lines changed- Plugin/ai
- submodules
6 files changed
+25
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
| 614 | + | |
615 | 615 | | |
616 | 616 | | |
617 | 617 | | |
| |||
669 | 669 | | |
670 | 670 | | |
671 | 671 | | |
672 | | - | |
| 672 | + | |
673 | 673 | | |
674 | 674 | | |
675 | 675 | | |
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
900 | 904 | | |
901 | 905 | | |
902 | 906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
709 | | - | |
| 710 | + | |
710 | 711 | | |
711 | 712 | | |
712 | 713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| 42 | + | |
| 43 | + | |
40 | 44 | | |
41 | 45 | | |
42 | 46 | | |
| |||
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
118 | | - | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
125 | 136 | | |
126 | | - | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
133 | | - | |
| 143 | + | |
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| 243 | + | |
243 | 244 | | |
244 | 245 | | |
245 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1269 | 1269 | | |
1270 | 1270 | | |
1271 | 1271 | | |
1272 | | - | |
| 1272 | + | |
1273 | 1273 | | |
1274 | 1274 | | |
1275 | 1275 | | |
| |||
- .github/workflows/macos.yml+8-1
- .github/workflows/ubuntu.yml+6-2
- .github/workflows/windows.yml+29-8
- AGENTS.md+53
- CMakeLists.txt+1
- README.md+995-199
- assistant/CMakeLists.txt+2
- assistant/assistantlib.hpp+19-3
- assistant/client/client_base.cpp+1-1
- assistant/client/client_base.hpp+2-2
- assistant/client/openai_client.cpp+154
- assistant/client/openai_client.hpp+11-1
- assistant/common.hpp+27-7
- assistant/function_base.hpp+39-7
- assistant/openai_response_parser.cpp+247
- assistant/openai_response_parser.hpp+100
- cli/main.cpp+43-7
- cli/utils.hpp+31
- tests/CMakeLists.txt+30-50
- tests/test_openai_client.cpp+270
- tests/test_openai_response_format.cpp+316
- tests/test_openai_response_parser.cpp+258
0 commit comments