import 'package:dio/dio.dart';
import 'package:keyboard/data/api/request/deep_seek_chat_request.dart';
import 'package:keyboard/data/api/request/intimacy_reply_analyze_request.dart';
import 'package:keyboard/data/api/request/intimacy_reply_chat_request.dart';
import 'package:retrofit/error_logger.dart';
import 'package:retrofit/http.dart';
import 'package:retrofit/retrofit.dart';
import '../consts/constants.dart';

/// 注：每次生成前，要将.c改成.g，生成后，再重命名为.c

part 'atmob_stream_api.c.dart';
// part 'atmob_stream_api.g.dart';

/// 要把生成的.g文件中，每个方法的，final _result = await _dio.fetch<Map<String, dynamic>>(_options);，去掉
/// 改成下面这2句：
/// final _result = await _dio.fetch<ResponseBody>(_options);
/// return _result.data!;

@RestApi()
abstract class AtmobStreamApi {
  factory AtmobStreamApi(Dio dio, {String baseUrl}) = _AtmobStreamApi;

  @POST("/project/gpt/v1/chat/deepseek/stream")
  Future<ResponseBody> deepSeekChat(@Body() DeepSeekChatRequest request);

  /// 对话分析
  @POST("/project/keyboard/v1/intimacy/chat/analyze")
  Future<ResponseBody> intimacyChatAnalyze(
    @Body() IntimacyChatAnalyzeRequest request,
  );
}
