Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 2.68 KB

README.md

File metadata and controls

77 lines (45 loc) · 2.68 KB

ComfyUI-QianFan-LLM

ComfyUI nodes utilizing LLM models on QianFan Platform (百度智能云千帆大模型平台)

Qianfan-LLM

NOTICE: This Project is WIP, send issue if you want some missing features

Pre-requisites

  1. Clone into custom_nodes folder of ComfyUI
  2. Install SDK(s) by running python -m pip install -U -r requirements.txt
  3. Run ComfyUI first, and then edit config.yaml to fill in your own credentials
    1. AppBuilder Credentials
    2. QianFan Credentials

Modules

appbuilder (千帆AppBuilder)

Document: 千帆AppBuilder-SDK

Implemented: DialogSummary, PlayGround

DialogSummary

Inputs:

  • model: selection of use model
  • dialog: the dialog string to be summerized

Snipaste_2024-05-16_01-20-26

Hint: only some of the models would response with pure JSON format that can be parsed, choose wisely

PlayGround

Inputs:

  • model: selection of use model
  • prompt_template: use in str.format to fill in params
  • params: yaml format, parse into dict and send to str.format

Snipaste_2024-01-22_01-47-43

qianfan (千帆大模型平台)

Document: 千帆大模型平台-SDK

Implemented: Chat, Completion

Chat

Document: 千帆大模型平台-SDK

Inputs:

  • model: selection of use model
  • current message: yaml format, list of dicts, role and content are required
  • endpoint: optional, only activate when model set to ENDPOINT
  • history messages: optional, yaml format, like current message

actually will concatenate history messages and current message, then send to model

Snipaste_2024-01-22_01-46-53

Completion

Document: 千帆大模型平台-SDK

Inputs:

  • model: selection of use model
  • prompt: prompt text
  • endpoint: optional, only activate when model set to ENDPOINT

Snipaste_2024-01-22_03-48-08