kopia lustrzana https://github.com/transitive-bullshit/chatgpt-api
feat: add sleep util
rodzic
579aec8008
commit
79c9d4424f
|
@ -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