mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
modify docker setup
This commit is contained in:
parent
d9930dd2bc
commit
08f59819cf
20 changed files with 146 additions and 25863 deletions
|
|
@ -23,8 +23,8 @@ export default function Conversation({
|
|||
const { modelMap } = useSelector((state) => state.models);
|
||||
const inputRef = useRef(null);
|
||||
const dispatch = useDispatch();
|
||||
const { trigger } = manualSWR(`http://api:3080/messages/${id}`, 'get');
|
||||
const rename = manualSWR(`http://api:3080/convos/update`, 'post');
|
||||
const { trigger } = manualSWR(`http://localhost:3080/api/messages/${id}`, 'get');
|
||||
const rename = manualSWR(`http://localhost:3080/api/convos/update`, 'post');
|
||||
|
||||
const clickHandler = async () => {
|
||||
if (conversationId === id) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import { setMessages } from '~/store/messageSlice';
|
|||
export default function DeleteButton({ conversationId, renaming, cancelHandler }) {
|
||||
const dispatch = useDispatch();
|
||||
const { trigger } = manualSWR(
|
||||
`http://api:3080/convos/clear`,
|
||||
`http://localhost:3080/api/convos/clear`,
|
||||
'post',
|
||||
() => {
|
||||
dispatch(setMessages([]));
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export default function ModelDialog({ mutate, modelMap }) {
|
|||
const [saveText, setSaveText] = useState('Save');
|
||||
const [required, setRequired] = useState(false);
|
||||
const inputRef = useRef(null);
|
||||
const updateCustomGpt = manualSWR(`http://api:3080/customGpts/`, 'post');
|
||||
const updateCustomGpt = manualSWR(`http://localhost:3080/api/customGpts/`, 'post');
|
||||
|
||||
const submitHandler = (e) => {
|
||||
if (chatGptLabel.length === 0) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default function ModelMenu() {
|
|||
const dispatch = useDispatch();
|
||||
const { model, customModel } = useSelector((state) => state.submit);
|
||||
const { models, modelMap, initial } = useSelector((state) => state.models);
|
||||
const { trigger } = manualSWR(`http://api:3080/customGpts`, 'get', (res) => {
|
||||
const { trigger } = manualSWR(`http://localhost:3080/api/customGpts`, 'get', (res) => {
|
||||
if (models.length + res.length === models.length) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,12 +11,12 @@ export default function ClearConvos() {
|
|||
const { mutate } = useSWRConfig()
|
||||
|
||||
const { trigger } = manualSWR(
|
||||
`http://api:3080/convos/clear`,
|
||||
`http://localhost:3080/api/convos/clear`,
|
||||
'post',
|
||||
() => {
|
||||
dispatch(setMessages([]));
|
||||
dispatch(setConversation({ error: false, title: 'New chat', conversationId: null, parentMessageId: null }));
|
||||
mutate(`http://api:3080/convos`);
|
||||
mutate(`http://localhost:3080/api/convos`);
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default function Nav() {
|
|||
};
|
||||
|
||||
const { data, isLoading, mutate } = swr(
|
||||
`http://api:3080/convos?pageNumber=${pageNumber}`
|
||||
`http://localhost:3080/api/convos?pageNumber=${pageNumber}`
|
||||
, onSuccess);
|
||||
const containerRef = useRef(null);
|
||||
const scrollPositionRef = useRef(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue