// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 修改 修改UpdateVO中不为空的字段 PUT /fAiApplicationHistory */
export async function update16(
  body: API.FAiApplicationHistoryUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.RFAiApplicationHistory>(`/finyx/fAiApplicationHistory`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 新增 POST /fAiApplicationHistory */
export async function save16(
  body: API.FAiApplicationHistorySaveVO,
  options?: { [key: string]: any }
) {
  return request<API.RFAiApplicationHistory>(`/finyx/fAiApplicationHistory`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 删除 DELETE /fAiApplicationHistory */
export async function delete16(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/finyx/fAiApplicationHistory`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /fAiApplicationHistory/${param0} */
export async function get15(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.get15Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RFAiApplicationHistoryResultVO>(`/finyx/fAiApplicationHistory/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 取消置顶 GET /fAiApplicationHistory/cancelTop */
export async function cancelTop(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.cancelTopParams,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fAiApplicationHistory/cancelTop`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 复制 POST /fAiApplicationHistory/copy */
export async function copy15(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.copy15Params,
  options?: { [key: string]: any }
) {
  return request<API.RFAiApplicationHistory>(`/finyx/fAiApplicationHistory/copy`, {
    method: 'POST',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 查询单体详情 GET /fAiApplicationHistory/detail */
export async function getDetail15(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetail15Params,
  options?: { [key: string]: any }
) {
  return request<API.RFAiApplicationHistoryResultVO>(`/finyx/fAiApplicationHistory/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /fAiApplicationHistory/findByIds */
export async function findByIds15(body: number[], options?: { [key: string]: any }) {
  return request<API.RListFAiApplicationHistoryResultVO>(`/finyx/fAiApplicationHistory/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 历史对话 需要传sessionId GET /fAiApplicationHistory/historySession/${param0}/${param1}/${param2} */
export async function historySession(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.historySessionParams,
  options?: { [key: string]: any }
) {
  const { sessionId: param0, current: param1, size: param2, ...queryParams } = params
  return request<API.R>(
    `/finyx/fAiApplicationHistory/historySession/${param0}/${param1}/${param2}`,
    {
      method: 'GET',
      params: { ...queryParams },
      ...(options || {})
    }
  )
}

/** 新建对话 POST /fAiApplicationHistory/newCreateSession */
export async function newCreateSession(options?: { [key: string]: any }) {
  return request<API.R>(`/finyx/fAiApplicationHistory/newCreateSession`, {
    method: 'POST',
    ...(options || {})
  })
}

/** 分页列表查询 POST /fAiApplicationHistory/page */
export async function page15(
  body: API.PageParamsFAiApplicationHistoryPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RIPageFAiApplicationHistoryResultVO>(`/finyx/fAiApplicationHistory/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 是否喜欢 GET /fAiApplicationHistory/praise */
export async function praise(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.praiseParams,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fAiApplicationHistory/praise`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 预览 POST /fAiApplicationHistory/preview/stream */
export async function previewStream(
  body: API.FAiApplicationHistorySaveVO,
  options?: { [key: string]: any }
) {
  return request<API.SseEmitter>(`/finyx/fAiApplicationHistory/preview/stream`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /fAiApplicationHistory/query */
export async function query15(
  body: API.FAiApplicationHistoryPageQuery,
  options?: { [key: string]: any }
) {
  return request<API.RListFAiApplicationHistoryResultVO>(`/finyx/fAiApplicationHistory/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 获取智能问答参数 POST /fAiApplicationHistory/questionAnswering */
export async function questionAnswering(
  body: API.FAiApplicationHistorySaveVO,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fAiApplicationHistory/questionAnswering`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 智能问答 POST /fAiApplicationHistory/questionAnswering/stream */
export async function questionAnsweringStream(
  body: API.FAiApplicationHistorySaveVO,
  options?: { [key: string]: any }
) {
  return request<API.SseEmitter>(`/finyx/fAiApplicationHistory/questionAnswering/stream`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 重新生成 POST /fAiApplicationHistory/questionAnsweringAgain */
export async function questionAnsweringAgainStream(
  body: API.FAiApplicationHistoryUpdateVO,
  options?: { [key: string]: any }
) {
  return request<API.RFAiApplicationHistory>(
    `/finyx/fAiApplicationHistory/questionAnsweringAgain`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {})
    }
  )
}

/** 对话历史 GET /fAiApplicationHistory/sessionHistory */
export async function sessionHistory(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.sessionHistoryParams,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fAiApplicationHistory/sessionHistory`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 置顶 GET /fAiApplicationHistory/top */
export async function top(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.topParams,
  options?: { [key: string]: any }
) {
  return request<API.R>(`/finyx/fAiApplicationHistory/top`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}
