Skip to content

Commit 3959bac

Browse files
Adding mandatory model name to llm gateway call
1 parent d576453 commit 3959bac

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/datacustomcode/llm_gateway/types/generate_text_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GenerateTextRequest(BaseModel):
3939
default="v1", description="API version, must be 'v1'"
4040
)
4141
model_name: str = Field(..., min_length=1, description="Name of the model to use")
42-
prompt: str = Field(..., min_length=1, max_length=1000, description="Input prompt")
42+
prompt: str = Field(..., description="Input prompt")
4343
localization: Optional[Dict[str, Any]] = Field(
4444
default=None, description="Localization settings"
4545
)

src/datacustomcode/templates/function/payload/entrypoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def function(request: dict, runTime: Runtime) -> dict:
4747
current_seq_no = 1 # Start sequence number from 1
4848

4949
builder = GenerateTextRequestBuilder()
50-
llm_request = builder.set_prompt("Hello").set_model("").build()
50+
llm_request = builder.set_prompt("Hello").set_model("modelName").build()
5151
llm_response = runTime.llm_gateway.generate_text(llm_request)
5252

5353
if llm_response.is_success:

0 commit comments

Comments
 (0)