kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: add sleep util
rodzic
f8686afe27
commit
81eb5f4594
|
@ -3,3 +3,6 @@ export const extractJSONObjectFromString = (text: string): string | undefined =>
|
|||
|
||||
export const extractJSONArrayFromString = (text: string): string | undefined =>
|
||||
text.match(/\[(.|\n)*\]/gm)?.[0]
|
||||
|
||||
export const sleep = (ms: number) =>
|
||||
new Promise((resolve) => setTimeout(resolve, ms))
|
||||
|
|
Ładowanie…
Reference in New Issue