Commit graph

10 commits

Author SHA1 Message Date
leo
c3eca0d7fd
refactor: OpenAI integration (#996)
- Add `OpenAIResponse` to trim the `<think>...</think>` block
- Add an `Enable Streaming` option to fix the issue that some services do not support streaming output

Signed-off-by: leo <longshuang@msn.cn>
2025-02-19 18:01:16 +08:00
GadflyFang
ef2e0a8a56
fix: Ignore the Chain-of-Thought in AI response (#952)
- Improve chat response processing to handle thinking patterns using regular expressions.
- Migrate server value by removing trailing '/chat/completions' path.
2025-02-08 17:30:27 +08:00
leo
2495911bd8
code_style: run dotnet format
Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 12:08:06 +08:00
leo
a915708db3
refactor: rewrite OpenAI integration
- use `OpenAI` and `Azure.AI.OpenAI`
- use `developer` role instead of `system` for OpenAI's `o1` series models
- use streaming response
- re-design `AIAssistant`

Signed-off-by: leo <longshuang@msn.cn>
2025-02-08 10:03:11 +08:00
leo
1044915be1
refactor: OpenAI integration
* supports configure multiple services
* supports select service when generate commit message by OpenAI

Signed-off-by: leo <longshuang@msn.cn>
2024-10-28 11:00:11 +08:00
leo
12bb915bd8
code_review: PR #596
- Add `ViewModels.Preference.PrepareOpenAIPrompt()` method to generate default prompt instead of a const fallback value. Therefore, it is more convenient for us to modify the default value in the Preference dialog.
- Modify the default prompts. Rename `SubjectPrompt` to `GenerateSubjectPrompt`. Rename `SummaryPrompt` to `AnalyzeDiffPrompt`.
- Rewrite the way to build OpenAI user content for subject generation

Signed-off-by: leo <longshuang@msn.cn>
2024-10-24 10:22:06 +08:00
Douglas Cunha
2f68aed817
feat: improve commit message generation with AI prompts (#596)
- Refactor the commit message generation process to utilize default prompts and enhance clarity while eliminating redundancy.
- Added new properties for subject and summary prompts, while improving cancellation support in async task handling.
- feat: add AI prompts for commit message generation.
- Updated the formatting of the package reference for consistency in the project file.
- Add properties for managing OpenAI subject and summary prompts in the Preference view model.
- Refactor layout and add new input fields for AI subject and summary prompts in the preferences view.
2024-10-24 09:31:05 +08:00
leo
fb0120d338
refactor: terminal/shell integration (#471) 2024-09-14 12:09:50 +08:00
leo
886b242b66
enhance: added cancellation logic to the OpenAI chat response API call. 2024-09-13 14:25:38 +08:00
leo
16f8e2fd0b
feature: simple implementation for generating commit message by OpenAI (#456) 2024-09-12 09:42:47 +08:00