I need use My own LLM to answer user's question. And I don't like get response via Power automate HTTP Action, cause 2min timeout limit.
So I plan to use HTTP POST in topic to get my own LLM(fine-tuned) response and answer user's question.
My question is How to send Var like Activity.Text in JSON content along with my prompt
{
"messages": [
{
"role": "system",
"content": "My sys prompt." #my sys prompt string
},
{
"role": "user",
"content": "Var in Copilot studio" # here, I need Var like Activity.Text. how to do that?
},
{
"role": "assistant",
"content": ""
}
],
"max_tokens": 1500,
"temperature": 0.2,
"frequency_penalty": 0,
"presence_penalty": 0,
"top_p": 0.95,
"stop": null
}
and I try to use the following FX
{
messages: [
{
role: "system",
content: "prompt string."
},
{
role: "user",
content: "Topic.UserPrompt"
},
{
role: "assistant",
content: Topic.UserPrompt
}
],
max_tokens: 1500,
temperature: 0.2,
frequency_penalty: 0,
presence_penalty: 0,
top_p: 0.95,
stop:
}
The "stop" key is missing a value. You can even use an empty value, just assign something.