Skip to content

Commit

Permalink
Update trtllm_llama.py (#797)
Browse files Browse the repository at this point in the history
I was testing this file in modal examples and it broke. This fixes the error `TypeError: 'GenerateRequest' object is not subscriptable`.
  • Loading branch information
fangherk authored Jun 25, 2024
1 parent f893c87 commit 766f364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 06_gpu_and_ml/llm-serving/trtllm_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ class GenerateRequest(pydantic.BaseModel):
)
def generate_web(data: GenerateRequest) -> list[str]:
"""Generate responses to a batch of prompts, optionally with custom inference settings."""
return Model.generate.remote(data["prompts"], settings=None)
return Model.generate.remote(data.prompts, settings=None)


# To set our function up as a web endpoint, we need to run this file --
Expand Down

0 comments on commit 766f364

Please sign in to comment.