Skip to content

Commit

Permalink
update for the web model worker
Browse files Browse the repository at this point in the history
  • Loading branch information
OvidijusParsiunas committed Jan 15, 2024
1 parent f0c0c5b commit 43f75d4
Show file tree
Hide file tree
Showing 2 changed files with 411 additions and 431 deletions.
16 changes: 10 additions & 6 deletions website/docs/docs/webModel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,16 @@ self.onmessage = (msg) => {

#### Example

<ComponentContainer>
<DeepChatBrowser
style={{borderRadius: '8px'}}
webModel={{worker: new Worker(new URL('./worker.js', import.meta.url), {type: 'module'})}}
></DeepChatBrowser>
</ComponentContainer>
<BrowserOnly>
{() => (
<ComponentContainer>
<DeepChatBrowser
style={{borderRadius: '8px'}}
webModel={{worker: new Worker(new URL('./worker.js', import.meta.url), {type: 'module'})}}
></DeepChatBrowser>
</ComponentContainer>
)}
</BrowserOnly>

<Tabs>
<TabItem value="js" label="Sample code">
Expand Down
Loading

0 comments on commit 43f75d4

Please sign in to comment.