Ensure date is passed to pipeline. Fix woring
This commit is contained in:
@@ -10,6 +10,7 @@ export async function hydratePrompt(path: string, state: any) : Promise<string>
|
|||||||
raw = raw.replace("###TITLE###", state.disinformationTitle);
|
raw = raw.replace("###TITLE###", state.disinformationTitle);
|
||||||
raw = raw.replace("###LM###", state.messages.at(-1).content);
|
raw = raw.replace("###LM###", state.messages.at(-1).content);
|
||||||
raw = raw.replace("###NTITLE###", state.normalizedClaim);
|
raw = raw.replace("###NTITLE###", state.normalizedClaim);
|
||||||
|
raw = raw.replace("###CDATE###", state.date);
|
||||||
|
|
||||||
if (raw.indexOf("###TECLAIM###") != -1) {
|
if (raw.indexOf("###TECLAIM###") != -1) {
|
||||||
const title = state.proposedTriggerEvent[state.proposedTriggerEventIndex].Event
|
const title = state.proposedTriggerEvent[state.proposedTriggerEventIndex].Event
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ There is a false disinformation claim circulating:
|
|||||||
###NTITLE###
|
###NTITLE###
|
||||||
Produce up-to 5 specific "trigger events" that happened that could have led to the spread of this disinformation.
|
Produce up-to 5 specific "trigger events" that happened that could have led to the spread of this disinformation.
|
||||||
|
|
||||||
Remember the time frame of the disinformation campaign: {{CAMPAIGN_DATE}}
|
Remember the time frame of the disinformation campaign: ###CDATE###
|
||||||
Include no information or events that would not have been available at the time.
|
Include no information or events that would not have been available at the time.
|
||||||
|
|
||||||
Produce no more text other than the json.
|
Produce no more text other than the json.
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export const ProposedTriggerEventArray = z.array(ProposedTriggerEvent);
|
|||||||
|
|
||||||
export const MessagesState = new StateSchema({
|
export const MessagesState = new StateSchema({
|
||||||
disinformationTitle: z.string(),
|
disinformationTitle: z.string(),
|
||||||
|
date: z.string(),
|
||||||
messages: MessagesValue,
|
messages: MessagesValue,
|
||||||
proposedTriggerEvent: ProposedTriggerEventArray,
|
proposedTriggerEvent: ProposedTriggerEventArray,
|
||||||
proposedTriggerEventIndex: z.int(),
|
proposedTriggerEventIndex: z.int(),
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const client = new Client({ apiUrl: API_URL });
|
|||||||
type Claim = {
|
type Claim = {
|
||||||
documentUrl: string;
|
documentUrl: string;
|
||||||
text: string;
|
text: string;
|
||||||
|
dateCreated: string;
|
||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -43,6 +44,7 @@ async function processClaim(claim: Claim): Promise<ResultRecord> {
|
|||||||
{
|
{
|
||||||
input: {
|
input: {
|
||||||
disinformationTitle: claim.text,
|
disinformationTitle: claim.text,
|
||||||
|
date: claim.dateCreated
|
||||||
},
|
},
|
||||||
streamMode: "values",
|
streamMode: "values",
|
||||||
config: {
|
config: {
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def render():
|
|||||||
st.markdown(c.get("reasoningWhyRelevant"))
|
st.markdown(c.get("reasoningWhyRelevant"))
|
||||||
st.markdown("---")
|
st.markdown("---")
|
||||||
|
|
||||||
if st.button("Submit PERFECT Ranking"):
|
if st.button("Submit Ranking"):
|
||||||
|
|
||||||
n = len(order)
|
n = len(order)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user