10 Commits

Author SHA1 Message Date
Aman Kumar
211d071832 fix: handle empty string for CAPTAIN_OPEN_AI_ENDPOINT config (#12435)
When CAPTAIN_OPEN_AI_ENDPOINT is set to empty string, use .presence to
properly fall back to default OpenAI endpoint instead of creating
malformed URLs.

Fixes #12383

Co-authored-by: Pranav <pranav@chatwoot.com>
2025-09-15 17:48:18 -07:00
Shivam Mishra
75c57ad039 feat: use captain endpoint config in legacy OpenAI base service (#12060)
This PR migrates the legacy OpenAI integration (where users provide
their own API keys) from using hardcoded `https://api.openai.com`
endpoints to use the configurable `CAPTAIN_OPEN_AI_ENDPOINT` from the
captain configuration. This ensures consistency across all OpenAI
integrations in the platform.

## Changes

- Updated `lib/integrations/openai_base_service.rb` to use captain
endpoint config
- Updated `enterprise/app/models/enterprise/concerns/article.rb` to use
captain endpoint config
- Removed unused `enterprise/lib/chat_gpt.rb` class
- Added tests for endpoint configuration behavior
2025-07-30 08:58:27 +04:00
Sojan Jose
ab86f62fcc chore: Update GPT Model (#10111)
Update the open AI model, as 3.5 is being deprecated. Provide as option to swap out models via environment variables.
2024-09-16 09:41:20 +05:30
Shivam Mishra
abc511d00f fix: inconsistent OpenAI cache interface (#10009)
Signed-off-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2024-08-22 23:04:14 +05:30
Muhsin Keloth
429d281501 fix: Handle OpenAI API errors (#9560) 2024-08-22 10:24:13 +05:30
Sojan Jose
81060a72a4 feat: Improve reply suggestions using help center articles (#9026) 2024-03-03 20:25:19 -08:00
Sojan Jose
4c75bb68f4 chore: Fix OpenAI sentry errors (#7687)
- add check for nil condition
- add logs for openAI
2023-08-07 14:08:26 -07:00
Shivam Mishra
39f14bebbd fix: undefined method first for nil:NilClass (#7567)
Co-authored-by: Sojan Jose <sojan@pepalo.com>
2023-07-25 13:00:21 +03:00
Muhsin Keloth
19ff738211 feat: Add more options for AI reply suggestions (#7493) 2023-07-13 10:26:25 +05:30
Shivam Mishra
a940f4c1d2 feat: Allow label suggestions with OpenAI APIs (#7428) 2023-07-10 14:40:54 +05:30