Skip to main content

Notifications

Topic Creation & Management
Unanswered

How to send Var like Activity.Text in JSON content along with my prompt

Posted on by 11

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:
}

 

and got:
Unexpected characters. Characters are used in the formula in an unexpected way.
Unexpected characters. The formula contains 'Eof' where 'CurlyClose' is expected.

 

  • adilei Profile Picture
    adilei on at
    Re: How to send Var like Activity.Text in JSON content along with my prompt

    The "stop" key is missing a value. You can even use an empty value, just assign something.

     

    adilei_0-1711011576248.png

     

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
renatoromao Profile Picture

renatoromao 6,459

#2
Pstork1 Profile Picture

Pstork1 1,997

#3
Expiscornovus Profile Picture

Expiscornovus 1,708

Leaderboard

Featured topics