001/*
002 *  Copyright (c) 2023-2026, Agents-Flex (fuhai999@gmail.com).
003 *  <p>
004 *  Licensed under the Apache License, Version 2.0 (the "License");
005 *  you may not use this file except in compliance with the License.
006 *  You may obtain a copy of the License at
007 *  <p>
008 *  http://www.apache.org/licenses/LICENSE-2.0
009 *  <p>
010 *  Unless required by applicable law or agreed to in writing, software
011 *  distributed under the License is distributed on an "AS IS" BASIS,
012 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *  See the License for the specific language governing permissions and
014 *  limitations under the License.
015 */
016package com.agentsflex.core.model.chat;
017
018import com.agentsflex.core.model.client.ChatRequestSpec;
019import com.agentsflex.core.prompt.Prompt;
020
021import java.util.Map;
022
023public class ChatContext {
024
025    Prompt prompt;
026    ChatConfig config;
027    ChatOptions options;
028    ChatRequestSpec requestSpec;
029    Map<String, Object> attributes;
030
031    public Prompt getPrompt() {
032        return prompt;
033    }
034
035    public void setPrompt(Prompt prompt) {
036        this.prompt = prompt;
037    }
038
039    public ChatConfig getConfig() {
040        return config;
041    }
042
043    public void setConfig(ChatConfig config) {
044        this.config = config;
045    }
046
047    public ChatOptions getOptions() {
048        return options;
049    }
050
051    public void setOptions(ChatOptions options) {
052        this.options = options;
053    }
054
055
056    public ChatRequestSpec getRequestSpec() {
057        return requestSpec;
058    }
059
060    public void setRequestSpec(ChatRequestSpec requestSpec) {
061        this.requestSpec = requestSpec;
062    }
063
064    public Map<String, Object> getAttributes() {
065        return attributes;
066    }
067
068    public void addAttribute(String key, Object value) {
069        if (attributes == null) {
070            attributes = new java.util.HashMap<>();
071        }
072        attributes.put(key, value);
073    }
074
075    public void setAttributes(Map<String, Object> attributes) {
076        this.attributes = attributes;
077    }
078
079
080}