Add GPT-4 support (#25)
* mobile ui updates * fixes sidebar btn * return if null * mobile input blur * handle mobile enter key * new convo name * new delete mechanism * test height * revert * change padding * remove overflow * check relative * padding * done * retry * test * test * should work now * test * test * more * max h * revert * done
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { Conversation, OpenAIModelID, OpenAIModels } from "@/types";
|
||||
|
||||
export const cleanConversationHistory = (history: Conversation[]) => {
|
||||
// added model for each conversation (3/20/23)
|
||||
|
||||
if (history.length === 0) {
|
||||
return history;
|
||||
} else {
|
||||
return history.map((conversation) => {
|
||||
if (conversation.model) {
|
||||
return conversation;
|
||||
} else {
|
||||
return {
|
||||
...conversation,
|
||||
model: OpenAIModels[OpenAIModelID.GPT_3_5]
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const cleanSelectedConversation = (conversation: Conversation) => {
|
||||
// added model for each conversation (3/20/23)
|
||||
|
||||
if (conversation.model) {
|
||||
return conversation;
|
||||
} else {
|
||||
return {
|
||||
...conversation,
|
||||
model: OpenAIModels[OpenAIModelID.GPT_3_5]
|
||||
};
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user