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

LLMContext C++ unit tests and docs #1316

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
param descriptions
  • Loading branch information
efajardo-nv committed Oct 30, 2023
commit 5c6f9dbbc6c15faae4aa8e2859aee9c87e0bced5
34 changes: 17 additions & 17 deletions morpheus/_lib/include/morpheus/llm/llm_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,30 @@ class MORPHEUS_EXPORT LLMContext : public std::enable_shared_from_this<LLMContex
{
public:
/**
* @brief Construct a new LLMContext object
* @brief Construct a new LLMContext object.
*
*/
LLMContext();

/**
* @brief Construct a new LLMContext object
* @brief Construct a new LLMContext object.
*
* @param task
* @param message
* @param task task for new context
* @param message control message for new context
*/
LLMContext(LLMTask task, std::shared_ptr<ControlMessage> message);

/**
* @brief Construct a new LLMContext object
* @brief Construct a new LLMContext object.
*
* @param parent
* @param name
* @param inputs
* @param parent parent context
* @param name new context name
* @param inputs input mappings for new context
*/
LLMContext(std::shared_ptr<LLMContext> parent, std::string name, input_mappings_t inputs);

/**
* @brief Destroy the LLMContext object
* @brief Destroy the LLMContext object.
*
*/
~LLMContext();
Expand Down Expand Up @@ -127,8 +127,8 @@ class MORPHEUS_EXPORT LLMContext : public std::enable_shared_from_this<LLMContex
/**
* @brief Create new context from this context with provided name and input mappings.
*
* @param name
* @param inputs
* @param name name of new context
* @param inputs input mappings for new context
* @return std::shared_ptr<LLMContext>
*/
std::shared_ptr<LLMContext> push(std::string name, input_mappings_t inputs);
Expand All @@ -150,7 +150,7 @@ class MORPHEUS_EXPORT LLMContext : public std::enable_shared_from_this<LLMContex
/**
* @brief Get the parent output value corresponding to given internal input name.
*
* @param node_name
* @param node_name internal input name
* @return nlohmann::json::const_reference
*/
nlohmann::json::const_reference get_input(const std::string& node_name) const;
Expand All @@ -163,24 +163,24 @@ class MORPHEUS_EXPORT LLMContext : public std::enable_shared_from_this<LLMContex
nlohmann::json get_inputs() const;

/**
* @brief Set output map for this context.
* @brief Set output mappings for this context.
*
* @param outputs
* @param outputs output mappings
*/
void set_output(nlohmann::json outputs);

/**
* @brief Set an output value for this context.
*
* @param output_name
* @param output
* @param output_name output name
* @param output output value
*/
void set_output(const std::string& output_name, nlohmann::json output);

/**
* @brief Set the output names to propagate from this context when using pop.
*
* @param output_names
* @param output_names output names to propagate
*/
void set_output_names(std::vector<std::string> output_names);

Expand Down
Loading