| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- package com.cyksj.model.request.gpt;
- import lombok.Data;
- import java.util.List;
- import java.util.Map;
- /**
- * @author chan
- * @date 2024/4/1 18:36
- */
- @Data
- public class ConversationRequest {
- /* Conversation 对象
- {
- "action": "next",
- "messages": [
- {
- "id": "aaa2a3ac-f825-460f-ac20-bfb039b99257",
- "author": {
- "role": "user"
- },
- "content": {
- "content_type": "text",
- "parts": [
- "你好"
- ]
- },
- "metadata": {
- }
- }
- ],
- "parent_message_id": "aaa13a0c-b7cc-409f-a90f-d99f9e9488d6",
- "model": "gpt-4",
- "timezone_offset_min": -480,
- "suggestions": [
- "What can I do in Paris for 5 days, if I'm especially interested in fashion?",
- "Write a short-and-sweet text message inviting my neighbor to a barbecue.",
- "Can you brainstorm some edge cases for a function that takes birthdate as input and returns the horoscope?",
- "Make up a 5-sentence story about \"Sharky\", a tooth-brushing shark superhero. Make each sentence a bullet point."
- ],
- "history_and_training_disabled": false,
- "conversation_mode": {
- "kind": "primary_assistant"
- },
- "force_paragen": false,
- "force_paragen_model_slug": "",
- "force_nulligen": false,
- "force_rate_limit": false,
- "websocket_request_id": "171e7569-71a1-4d11-9b91-6a7f02093567"
- */
- private String action;
- private String conversation_id;
- private List<Message> messages;
- private String parent_message_id;
- private String model;
- private int timezone_offset_min;
- private List<String> suggestions;
- private boolean history_and_training_disabled;
- private ConversationMode conversation_mode;
- private boolean force_paragen;
- private String force_paragen_model_slug;
- private boolean force_nulligen;
- private boolean force_rate_limit;
- private String websocket_request_id;
- private String carId;
- // Inner class for Message
- @Data
- public static class Message {
- private String id;
- private Author author;
- private Content content;
- private Map<String, Object> metadata;
- // Inner class for Author
- public static class Author {
- private String role;
- // Getters and setters
- }
- // Inner class for Content
- public static class Content {
- private String content_type;
- private List<String> parts;
- // Getters and setters
- }
- // Getters and setters
- }
- // Inner class for ConversationMode
- public static class ConversationMode {
- private String kind;
- // Getters and setters
- }
- // Getters and setters
- }
|