chrisglein / artificial-chat

2 stars 1 forks source link

TypeError: Object doesn't support property or method 'matchAll' #52

Closed chrisglein closed 1 year ago

chrisglein commented 1 year ago

Query

"Write a sea shanty about the story of Jurassic Park in 2 verses with a chorus."

Log

 DEBUG  Have result for TEXT-ANSWER:"Write a sea shanty about the story of Jurassic Park in 2 verses with a chorus."
 DEBUG  {"choices": [{"finish_reason": "stop", "index": 0, "message": [Object]}], "created": 1678319937, "id": "chatcmpl-6rxyLuP0OcPJZuBVJTXNS7Xvce7Zx", "model": "gpt-3.5-turbo-0301", "object": "chat.completion", "usage": {"completion_tokens": 188, "prompt_tokens": 98, "total_tokens": 286}}
 LOG  AI response: "(Verse 1)
Come gather 'round, me hearties, and heed the tale I tell
'Bout a wild adventure that almost went to hell
'Twas on a lonely island where the dinosaurs did dwell
In Jurassic Park, that dangerous land

(Chorus)
Jurassic Park, Jurassic Park
A place where time has stood
Jurassic Park, Jurassic Park
Where the dinosaurs still roam the wood

(Verse 2)
The scientists they had a plan, to bring these beasts to life
But they never could have known the struggles and the strife
For the danger rose up quick, and it caused a lot of strife
In Jurassic Park, that dangerous land

(Chorus)
Jurassic Park, Jurassic Park
A place where time has stood
Jurassic Park, Jurassic Park
Where the dinosaurs still roam the wood

That's my creation, hope you liked it!"

Error

 ERROR  TypeError: Object doesn't support property or method 'matchAll'

This error is located at:
    in AiTextResponse (created by AiSectionContent)
    in RCTView (created by TextAncestorContext)
    in View (created by AiSection)
    in RCTView (created by TextAncestorContext)
    in View (created by Pressable)
    in Pressable (created by Pressable)
    in AiSection (created by AiSectionContent)
    in AiSectionContent (created by Chat)
    in RCTView (created by TextAncestorContext)
    in View (created by Chat)
    in RCTView (created by TextAncestorContext)
    in View (created by Chat)
    in RCTScrollContentView (created by ScrollView)
    in RCTScrollView (created by ScrollView)
    in ScrollView (created by ScrollView)
    in ScrollView (created by Chat)
    in RCTView (created by TextAncestorContext)
    in View (created by Chat)
    in Chat (created by AutomatedChatSession)
    in AutomatedChatSession (created by ChatSession)
    in ChatSession (created by App)
    in App
    in RCTView (created by TextAncestorContext)
    in View (created by AppContainer)
    in RCTView (created by TextAncestorContext)
    in View (created by AppContainer)
    in AppContainer
    in artificialChat(RootComponent)
chrisglein commented 1 year ago

Not sure why: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/matchAll#browser_compatibility