ConversationRequest.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. package com.cyksj.model.request.gpt;
  2. import lombok.Data;
  3. import java.util.List;
  4. import java.util.Map;
  5. /**
  6. * @author chan
  7. * @date 2024/4/1 18:36
  8. */
  9. @Data
  10. public class ConversationRequest {
  11. /* Conversation 对象
  12. {
  13. "action": "next",
  14. "messages": [
  15. {
  16. "id": "aaa2a3ac-f825-460f-ac20-bfb039b99257",
  17. "author": {
  18. "role": "user"
  19. },
  20. "content": {
  21. "content_type": "text",
  22. "parts": [
  23. "你好"
  24. ]
  25. },
  26. "metadata": {
  27. }
  28. }
  29. ],
  30. "parent_message_id": "aaa13a0c-b7cc-409f-a90f-d99f9e9488d6",
  31. "model": "gpt-4",
  32. "timezone_offset_min": -480,
  33. "suggestions": [
  34. "What can I do in Paris for 5 days, if I'm especially interested in fashion?",
  35. "Write a short-and-sweet text message inviting my neighbor to a barbecue.",
  36. "Can you brainstorm some edge cases for a function that takes birthdate as input and returns the horoscope?",
  37. "Make up a 5-sentence story about \"Sharky\", a tooth-brushing shark superhero. Make each sentence a bullet point."
  38. ],
  39. "history_and_training_disabled": false,
  40. "conversation_mode": {
  41. "kind": "primary_assistant"
  42. },
  43. "force_paragen": false,
  44. "force_paragen_model_slug": "",
  45. "force_nulligen": false,
  46. "force_rate_limit": false,
  47. "websocket_request_id": "171e7569-71a1-4d11-9b91-6a7f02093567"
  48. */
  49. private String action;
  50. private String conversation_id;
  51. private List<Message> messages;
  52. private String parent_message_id;
  53. private String model;
  54. private int timezone_offset_min;
  55. private List<String> suggestions;
  56. private boolean history_and_training_disabled;
  57. private ConversationMode conversation_mode;
  58. private boolean force_paragen;
  59. private String force_paragen_model_slug;
  60. private boolean force_nulligen;
  61. private boolean force_rate_limit;
  62. private String websocket_request_id;
  63. private String carId;
  64. // Inner class for Message
  65. @Data
  66. public static class Message {
  67. private String id;
  68. private Author author;
  69. private Content content;
  70. private Map<String, Object> metadata;
  71. // Inner class for Author
  72. public static class Author {
  73. private String role;
  74. // Getters and setters
  75. }
  76. // Inner class for Content
  77. public static class Content {
  78. private String content_type;
  79. private List<String> parts;
  80. // Getters and setters
  81. }
  82. // Getters and setters
  83. }
  84. // Inner class for ConversationMode
  85. public static class ConversationMode {
  86. private String kind;
  87. // Getters and setters
  88. }
  89. // Getters and setters
  90. }