Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 596 Bytes

README-EN.md

File metadata and controls

41 lines (30 loc) · 596 Bytes

spark-llm-api

this npm module use for intereact to 讯飞星火 LLM API.

usage

install

npm i spark-llm-api

step

1.import and create a Client instance

const { Client } = require('spark-llm-api')
const client = new Client({
  apiKey: '',
  apiSecret: '',
  appId: ''
})

2.chat and get response

  const response = await client.chat({
    messages: [
      {
        role: 'user',
        content: 'hello'
      }
    ]
  })

more

more detail please read demo in codes