From 7ba14e65e6a89e0f036c92709ac93051abc28b6a Mon Sep 17 00:00:00 2001 From: Graden Rea Date: Tue, 21 May 2024 15:52:46 -0700 Subject: [PATCH] chore: fix array indices in README examples --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 82c11cd..8ed555c 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ chat_completion = client.chat.completions.create( ], model="mixtral-8x7b-32768", ) -print(chat_completion.choices_0.message.content) +print(chat_completion.choices[0].message.content) ``` While you can provide an `api_key` keyword argument, @@ -66,7 +66,7 @@ async def main() -> None: ], model="mixtral-8x7b-32768", ) - print(chat_completion.choices_0.message.content) + print(chat_completion.choices[0].message.content) asyncio.run(main())