1234567891011121314151617181920 |
- import sys
- import os
- parent_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')
- sys.path.append(parent_dir)
- from qwen_agent.llm.llm_client import LLMClient
- lianqi_client = LLMClient(
- model='Yi_34B', model_server='http://10.10.0.10:7901/v1'
- )
- query = '北京哪里适合旅游,请带我去看看吧?'
- query = '你好!'
- response = lianqi_client.chat(query=query, stream=True)
- # from vllm.sampling_params import SamplingParams
- for rsp in response:
- # print(rsp, end='', flush=True)
- pass
- # print(response)
|