Open lectrician1 opened 7 months ago
Now yarn run build
fail with type errors
Has there been any updates with this?
Uhhh well haven't had time to finish this up but maybe will try this weekend...
@lectrician1 That would be amazing, this feature would literally be the revolutionary feature for this repo.
Lately the repo hasn't been very active, so this might just change the future of how active and innovative it becomes.
Please keep us updated here, will try to help :)
@Ahmet-Dedeler it's almost ready.
I just need help from @ztjhz @akira0245 or @ayaka14732 to write the migration code in migrate.ts
and chat.ts
to migrate the old data structure to the new one for ChatInterface
and associated interfaces (see the PR description). I tried doing this and it's really confusing. I'm not sure how the whole migrate process works.
I'll take a look at this.
Sorry for tagging but did any of you chance to look at this @ztjhz @akira0245 @ayaka14732 ?
Sorry for tagging but did any of you chance to look at this @ztjhz @akira0245 @ayaka14732 ?
@lectrician1
Is content wrong with no vision model?
[{'role': 'system', 'content': [{'type': 'text', 'text': 'You are assistant'}]}, {'role': 'user', 'content': [{'type': 'text', 'text': '1'}]}]
i asked ChatGPT and it write migration, it is works for me:
export const migrateV8 = (persistedState: LocalStorageInterfaceV7oV8) => {
persistedState.chats.forEach((chat) => {
chat.messages.forEach((message) => {
// Check if the old content structure exists
if (typeof message.content === 'string') {
// Convert the old content string to the new content array structure
message.content = [{
type: 'text', // assuming all old content is of type 'text'
text: message.content
}] as ContentInterface[];
}
});
});
};
I have error in EditView.tsx:246 state.chats is undefined, i just make this:
const model = useStore((state) => state.chats != undefined ? state.chats![state.currentChatIndex].config.model : "");
maybe you found better solution
Adds the ability to use the vision API in the client. Resolves #488 and #473
Message interface:![image](https://github.com/ztjhz/BetterChatGPT/assets/22477298/1036412d-ca5b-41d8-8994-7fa7dbd4d8bf)
Editing interface:![image](https://github.com/ztjhz/BetterChatGPT/assets/22477298/30bd916c-d6c4-499e-9d37-c9764ca466b1)
modelTypes
and check for it inEditView.tsx
Notable changes
This PR changes the the data structures of
ChatInterface
,MessageInterface
, and createsContentInterface
,TextContentInterface
andImageContentInterface
so that it follows the updated API JSON structure for prompts that contain images.Before:
After:
The
url
parameter stores the URL of the image locally (theblob:
URL) and at generation-time the client converts all the blob URLs into base64 for the API to take in.