diff --git a/README.md b/README.md index 4efc291e76..9d6c85b64c 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ function MyComponent() { ```tsx const handleGenerate = async () => { const chat = [ - { role: 'system', content: 'You are a helpful assistant' } + { role: 'system', content: 'You are a helpful assistant' }, { role: 'user', content: 'What is the meaning of life?' } ]; diff --git a/docs/docs/natural-language-processing/useLLM.md b/docs/docs/natural-language-processing/useLLM.md index 4f11a28094..da217aff1e 100644 --- a/docs/docs/natural-language-processing/useLLM.md +++ b/docs/docs/natural-language-processing/useLLM.md @@ -173,7 +173,7 @@ const llm = useLLM({ const handleGenerate = async () => { const chat = [ - { role: 'system' content: 'You are a helpful assistant' }, + { role: 'system', content: 'You are a helpful assistant' }, { role: 'user', content: 'Hi!' }, { role: 'assistant', content: 'Hi!, how can I help you?'}, { role: 'user', content: 'What is the meaning of life?' }, @@ -230,8 +230,14 @@ const llm = useLLM({ const handleGenerate = async () => { const chat = [ - { role: 'system' content: `You are a helpful assistant. Current time and date: ${new Date().toString()}` } - { role: 'user', content: `Hi, what's the weather like in Cracow right now?` } + { + role: 'system', + content: `You are a helpful assistant. Current time and date: ${new Date().toString()}`, + }, + { + role: 'user', + content: `Hi, what's the weather like in Cracow right now?`, + }, ]; // Chat completion diff --git a/docs/versioned_docs/version-0.4.x/natural-language-processing/useLLM.md b/docs/versioned_docs/version-0.4.x/natural-language-processing/useLLM.md index 4f11a28094..da217aff1e 100644 --- a/docs/versioned_docs/version-0.4.x/natural-language-processing/useLLM.md +++ b/docs/versioned_docs/version-0.4.x/natural-language-processing/useLLM.md @@ -173,7 +173,7 @@ const llm = useLLM({ const handleGenerate = async () => { const chat = [ - { role: 'system' content: 'You are a helpful assistant' }, + { role: 'system', content: 'You are a helpful assistant' }, { role: 'user', content: 'Hi!' }, { role: 'assistant', content: 'Hi!, how can I help you?'}, { role: 'user', content: 'What is the meaning of life?' }, @@ -230,8 +230,14 @@ const llm = useLLM({ const handleGenerate = async () => { const chat = [ - { role: 'system' content: `You are a helpful assistant. Current time and date: ${new Date().toString()}` } - { role: 'user', content: `Hi, what's the weather like in Cracow right now?` } + { + role: 'system', + content: `You are a helpful assistant. Current time and date: ${new Date().toString()}`, + }, + { + role: 'user', + content: `Hi, what's the weather like in Cracow right now?`, + }, ]; // Chat completion