Repository: lightonai/paradigm-client (language: python)

Issue:
Remove the comma in the default value of the use_session attribute.



Discussion / hints:

Fix patch:
diff --git a/paradigm_client/request.py b/paradigm_client/request.py
index 0343d84..31c896a 100644
--- a/paradigm_client/request.py
+++ b/paradigm_client/request.py
@@ -119,7 +119,7 @@ class Progress:
 class CreateRequest(BaseModel):
     text: str
     params: Optional[CreateParameters] = None
-    use_session: bool = True,
+    use_session: bool = True
     _validate_text = validator("text", allow_reuse=True)(check_text)
 
     @validator("params", always=True, pre=True)


Test patch:
diff --git a/tests/test_remote_model.py b/tests/test_remote_model.py
index a36c683..cb4601e 100644
--- a/tests/test_remote_model.py
+++ b/tests/test_remote_model.py
@@ -1,6 +1,7 @@
 from paradigm_client.response import CreateResponse, SelectResponse, TokenizeResponse
 from paradigm_client.remote_model import RemoteModel, DEFAULT_BASE_ADDRESS
 from paradigm_client.communicator import SagemakerCommunicator
+from paradigm_client.request import CreateRequest
 from unittest import mock
 import pytest
 import os
@@ -69,6 +70,13 @@ def test_tokenize(remote_model: RemoteModel):
     assert isinstance(response, TokenizeResponse)
 
 
+# Related issue: https://github.com/lightonai/paradigm-client/issues/7
+def test_create_from_objects(remote_model: RemoteModel):
+    requests = CreateRequest(text="Hello I am")
+    response = remote_model.create_from_objects(requests)
+    assert isinstance(response[0], CreateResponse)
+
+
 def test_can_log_a_boolean_feedback(
         remote_model: RemoteModel
 ):