This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"fields": { | |
"AccountNumber": { | |
"displayValue": null, | |
"value": null | |
}, | |
"Active__c": { | |
"displayValue": null, | |
"value": null | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"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)", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pokemon { | |
public Integer count; | |
public String next; | |
public String previous; | |
public List<Results> results; | |
public class Results { | |
public String name; | |
public String url; | |
} | |
public static Pokemon parse(String json) { |
NewerOlder