
_Créditos da imagem: ChatGPT
🥊 Protheus LMStudio MCPSalesOrderInsert 👋
## LMSTUDIO
- model: "mungert/qwen2.5-7b-instruct-1m"
```bash
--------------------------------
#PRAGMA @__BEGINPROMPT@
pode inserir o pedido conforme abaixo
Tipo: N, cliente: 000001, loja: 01, Tipo do cliente: F, condição de pagamento: 15, Natureza: 0000000001
produto: 000000000000001, quantidade: 3 unidades, Preço Unitário: 1, TES: 501, local: 01
produto: 000000000000002, quantidade: 15 unidades, Preço Unitário: 1, TES: 501, local: 01
produto: 000000000000003, quantidade: 25 unidades, Preço Unitário: 1, TES: 501, local: 01
#PRAGMA @__ENDPROMPT@
cAgentPrompt:=DNATechPlayTools():GetLLMPrompt()
oTMCPAgent:=TMCPAgent():New(;
"MATA410PLAYAGENT";
,uf.mata410play():MCPSalesOrderGetPrompt();
,uf.mata410play():MCPSalesOrderGetPurpose();
)
cToolName:="sales_order_insert"
cToolDesc:="Tool for creating and inserting new sales orders into the system. "
cToolDesc+=uf.mata410play():MCPSalesOrderGetExample()
oSalesOrderTool:=oTMCPAgent:AddTool(;
cToolName;
,cToolDesc;
,{;
|jParam|;
oTMCPAgent:CallBackTool(;
jParam;
,{;
|oTMCPAgent,jParam|;
uf.mata410play():MCPSalesOrderInsert(;
oTMCPAgent;
,jParam;
);
};
);
};
)
jSchema:=uf.mata410play():MCPSalesOrderGetJSONSchema()
oSalesOrderTool:SetMemberData("jInputSchema",jSchema)
cLLMURL:="http://127.0.0.1:11435/v1/chat/completions/"
oHTTPConnector:=TFWRestHTTPConnector():New(cLLMURL)
cLLMModel:=if(;
.T.;
,"mungert/qwen2.5-7b-instruct-1m";
,"mungert/qwen2.5-7b-instruct-1m";
)
oTLMStudio:=TLMStudio():New(;
cLLMModel;
,cLLMURL;
,oHTTPConnector;
)
oTLMStudio:AddAgent(oTMCPAgent)
oTLMStudio:Send(cAgentPrompt)
```
🔒🗂️Quer acesso a todos os códigos fontes? Apoie! 💖 : Torne-se um Sponsor e tenha acesso a repositórios privados e exclusivos!
---
#TOTVS #DNATech #LLM #LMStudio #InclusãoDePedidoDeVandasViaLLM #BrasilQueFaz #mungert/qwen2.5-7b-instruct-1m #AI
Torne-se um Sponsor:
🥊(дави)={0.5x[(Налдо)+(Алине)]}🥊
Comentários
Postar um comentário