Skip to content

Implement the RecommendationsAdapter [Boilerplate] #4302

@akolson

Description

@akolson

Overview

In addition to #4296, we need to create a RecommendationsAdapter that inherits the base Adapter class in the appnexus library. The RecommendationsAdapter should be able to make requests to the Recommendations backend to generate embeddings and get recommendations using its make_request method.

Description and outcomes

  1. Create a new class RecommendationsAdapter that inherits Adapter:
CLASS RecommendationsAdapter INHERITS Adapter:
	METHOD generateEmbeddings(self, params) -> Boolean
		# [ Implementation ]

	METHOD getRecommendations(self, params) -> Array
		# [ Implementation ]
  1. Implement the generate embeddings and get recommendations methods that use the make_request() method in the Backend class
  2. The actual functionality depends on presence of an actual backend, so boilerplate will do for now.
  3. The class should be implemented within the contentcuration app in contentcuration/contentcuration/utils/recommendations.py

Accessibility requirements

Not applicable

Acceptance criteria

  1. The RecommendationsAdapter is created and it inherits the Adapter class.
  2. The make_request method is called within the generate embedding and get recommendations methods.
  3. Tests are written to validate correctness of the RecommendationsAdapter logic.
  4. Documentation has been added to the backend class, explaining its purpose, inputs and outputs.

Resources

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions