From 920fe19608ba06ed8c2b4c9a23944af35cf24e56 Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Fri, 28 Apr 2023 00:40:43 +0530 Subject: added main module for accessing all services --- testing/forefront_test.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'testing/forefront_test.py') diff --git a/testing/forefront_test.py b/testing/forefront_test.py index 4d5f4bc1..092d1a74 100644 --- a/testing/forefront_test.py +++ b/testing/forefront_test.py @@ -1,10 +1,9 @@ -import forefront +from openai_rev import forefront # create an account token = forefront.Account.create(logging=True) print(token) # get a response -for response in forefront.StreamingCompletion.create(token=token, - prompt='hello world', model='gpt-4'): - print(response.completion.choices[0].text, end='') +for response in forefront.StreamingCompletion.create(token=token, prompt='hello world', model='gpt-4'): + print(response) -- cgit v1.2.3 From b206a1eb6364e519741ceb89e3f3b63910b4e1ef Mon Sep 17 00:00:00 2001 From: Raju Komati Date: Fri, 28 Apr 2023 02:27:06 +0530 Subject: update openai_rev module add test file with simple use --- testing/forefront_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testing/forefront_test.py') diff --git a/testing/forefront_test.py b/testing/forefront_test.py index 092d1a74..8d25ed89 100644 --- a/testing/forefront_test.py +++ b/testing/forefront_test.py @@ -6,4 +6,4 @@ print(token) # get a response for response in forefront.StreamingCompletion.create(token=token, prompt='hello world', model='gpt-4'): - print(response) + print(response.text, end='') -- cgit v1.2.3