Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trustgraph integration v1 #260

Closed
wants to merge 7 commits into from

Conversation

dauphin3
Copy link
Collaborator

using SweetTests

populates FeedMew with a weight and topic (hashtag) based on TrustGraph agent rating.

get_batch_mews_with_context_based_on_topic_and_weight_threshold() filters those mews containing the hashtagged topic and by minimum TrustAtom weight, sorted high to low

@dauphin3
Copy link
Collaborator Author

dauphin3 commented Dec 28, 2023

there may be a desire to have the topic field be a Vec in case of wanting to filter by multiple topics, although that would make the weight sorting calculations a bit more involved. we could have topics associated with categories and place TrustAtoms on those as well. or there could be parameters and use some type of matrix weight equation, if a feature like that is desired

@dauphin3
Copy link
Collaborator Author

Note: the word weight in the FeedMew field might cause a confusion somewhere since there is another weight that is used in HC and so we could consider renaming to trusted_weight or trust_atom_weight or some equivalent

@harlantwood
Copy link
Collaborator

Linking in prior TrustGraph PRs in case they are helpful:

@harlantwood
Copy link
Collaborator

@dauphin3 looks like merge conflict got checked in:

IMG_2884

dauphin3 and others added 2 commits January 2, 2024 18:58
Update Cargo.lock

Update Cargo.lock

rm duplicates

Update Cargo.lock

Update Cargo.lock
holo-dev-server

Cargo.lock
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should keep the cargo lockfile in git

@@ -2,24 +2,28 @@ use hc_link_pagination::AgentPubKeyPagination;
use hdk::prelude::*;

#[derive(Serialize, Deserialize, SerializedBytes, Clone, Debug)]
#[serde(rename_all = "camelCase")]
Copy link
Collaborator

@mattyg mattyg Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to have serde serialize input types to camelCase, but it should be consistent for all the input types. Maybe for now its simplest to just keep these as the snake_case serialization and then later make another PR to convert all input types to camelCase?


Ok(())
}

#[hdk_extern]
pub fn follow(agent: AgentPubKey) -> ExternResult<()> {
pub fn follow(input: FollowInput) -> ExternResult<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe all this logic should just be included in add_creator_for_follower(), and we can keep follow() as just an alias to it

@mattyg
Copy link
Collaborator

mattyg commented Jan 10, 2024

sorry for the late review - this is awesome!

I made some comments inline for minor cleanup.

Would this work with cashtags as well, or just hashtags?

Would you want to setup a call to go over this and figure out what's needed to get it integrated into the UI?

@mattyg mattyg mentioned this pull request Jan 15, 2024
8 tasks
@mattyg
Copy link
Collaborator

mattyg commented Jan 15, 2024

Moved to branch in this repo: #261

@mattyg mattyg closed this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants