MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / generate

Method generate

tests/conftest.py:57–68  ·  view source on GitHub ↗
(
        self,
        prompts: list[str],
        sampling_params,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

55 )
56
57 def generate(
58 self,
59 prompts: list[str],
60 sampling_params,
61 **kwargs: Any,
62 ) -> list[tuple[list[list[int]], list[str]]]:
63
64 req_outputs = self.llm.generate(prompts, sampling_params=sampling_params, **kwargs)
65 outputs: list[tuple[list[list[int]], list[str]]] = []
66 for output in req_outputs:
67 outputs.append((output.outputs.token_ids, output.outputs.text))
68 return outputs
69
70 def generate_topp0(
71 self,

Callers 2

generate_topp0Method · 0.95
offline_demo.pyFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected