openapi: 3.0.4 info: title: Sample API description: Optional multiline or single-line description in CommonMark or HTML. version: 0.1.9
servers:
- url: http://api.example.com/v1 description: Optional server description, e.g. Main (production) server
| name: Code Analysis | |
| on: [push, pull_request] | |
| jobs: | |
| scan: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v2 | |
| - name: Install SFDX |
openapi: 3.0.4 info: title: Sample API description: Optional multiline or single-line description in CommonMark or HTML. version: 0.1.9
servers:
| List<DWS_API__c> dwsList = [SELECT Id, fromDate__c, toDate__c, apiToken__c, privateToken__c, expirationDate__c FROM DWS_API__c LIMIT 1]; | |
| DWS_API__c dws = dwsList[0]; | |
| System.debug (dws); | |
| String apiToken = dws.apiToken__c; | |
| String privateToken = dws.privateToken__c; | |
| HttpRequest req = new HttpRequest(); | |
| req.setEndpoint('https://ws.dws.utah.gov/uwapi/rest/va/token'); |
| import mimetypes | |
| import requests | |
| import urllib.request | |
| import urllib.parse | |
| from urllib.error import URLError, HTTPError | |
| import json | |
| from json import JSONDecodeError | |
| import argparse | |
| import re | |
| import os |
| import subprocess | |
| import pandas as pd | |
| import json | |
| import nltk | |
| def get_ners(txt): | |
| from nltk import Tree | |
| from nltk.chunk import ne_chunk | |
| from nltk.tag import pos_tag | |
| from nltk.tokenize import word_tokenize |
| { | |
| "fields": { | |
| "AccountNumber": { | |
| "displayValue": null, | |
| "value": null | |
| }, | |
| "Active__c": { | |
| "displayValue": null, | |
| "value": null | |
| }, |
| # the steps to get the conversations and CURL string are required before this should be run | |
| # after successfully getting the CURL string and you are in the chatgpt UI and you have updated | |
| # the config to match your setup, these will process from the consolidated.json file that is all of the chats put together | |
| # the consolidation.json is dropped in place when the script for consolidate_json is ran | |
| # this will output the role and message from an array of full json objects | |
| cat ./logs/consolidated.json | jq -c '.[]|{title: .title, mapping: (.mapping | to_entries | map({message: .value.message|{content:.content}, role:.value.message.role}))}'|jq -r '[.mapping[] | {role: .role, message: .message.content.parts[0]}]' | jq . | |
| # this will show only the user questions in the full array of objects: | |
| cat ./logs/consolidated.json | jq -c '.[]|{title: .title, mapping: (.mapping | to_entries | map({message: .value.message|{content:.content}, role:.value.message.role}))}'|jq -r '[.mapping[] | {role: .role, message: .message.c |
| [ | |
| { | |
| "Id": "0QL6S000007cXt0WAE", | |
| "PricebookEntry": "[object Object]", | |
| "Description": null, | |
| "Quantity": "1", | |
| "TotalPrice": "4950", | |
| "AVA_SFQUOTES__Sales_Tax_Amount__c": "309.38", | |
| "AVA_SFQUOTES__Rate__c": "6.25%", | |
| "AVA_SFQUOTES__Sales_Tax_Details__c": "6.25% State Sales Tax (TEXAS)", |