import { ChatOpenAI } from '@langchain/openai';

const model = new ChatOpenAI({
  model: 'qwen3.6-plus',
  apiKey: 'sk-c25679401ba24c749f53be86b0c9a7a6',
  configuration: {
    baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
  },
  temperature: 0.7,
});

async function test() {
  console.log('Testing LangChain with qwen3.6-plus...');
  try {
    const result = await model.invoke('你是谁？');
    console.log('Result:', result.content);
  } catch (e: any) {
    console.error('Error:', e.message);
  }
}

test();
