MCPcopy Create free account
hub / github.com/agentscope-ai/Trinity-RFT / chat_async

Method chat_async

trinity/common/models/model.py:529–532  ·  view source on GitHub ↗

Generate a list of experiences from a list of messages in async.

(self, messages: List[dict], **kwargs)

Source from the content-addressed store, hash-verified

527
528 @_history_recorder
529 async def chat_async(self, messages: List[dict], **kwargs) -> List[Experience]:
530 """Generate a list of experiences from a list of messages in async."""
531 lora_request = await self.get_lora_request_async()
532 return await self.model.chat.remote(messages, lora_request=lora_request, **kwargs)
533
534 def logprobs(self, tokens: List[int], temperature: Optional[float] = None) -> Tensor:
535 """Calculate the logprobs of the given tokens."""

Callers 15

run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
run_asyncMethod · 0.80
get_model_responseMethod · 0.80
run_asyncMethod · 0.80
run_single_rolloutMethod · 0.80

Calls 2

remoteMethod · 0.80

Tested by 4

run_asyncMethod · 0.64
test_generateMethod · 0.64
test_generateMethod · 0.64
test_chat_completionsMethod · 0.64