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

Refactor llm_* Function Call Structure for Enhanced Flexibility in Prompt Specification #61

Merged
merged 4 commits into from
Nov 17, 2024

Conversation

dorbanianas
Copy link
Member

This change updates the llm_* function call format to allow a more flexible and abstracted specification of prompts and prompt names. The previous structure, which required llm_filter('validate-email', {'model_name': 'default'}, {'email': email}), is now updated to accept parameters in the following format:

  1. Prompt-Based Calls: llm_filter({'model_name': 'default'}, {'prompt': 'return the invalid emails'}, {'email': email})
  2. Named Prompt Calls: llm_filter({'model_name': 'default'}, {'prompt-name': 'validate-email'}, {'email': email})

This refactor allows for easier adaptation to various prompt names and specifications, enhancing modularity and reusability across different use cases.

@dorbanianas dorbanianas changed the base branch from main to feat/batching-on-output-max-size November 11, 2024 20:26
@dorbanianas dorbanianas force-pushed the feat/batching-on-output-max-size branch from 3d1b17e to a200ef3 Compare November 12, 2024 21:42
@dorbanianas dorbanianas force-pushed the feat/different-prompt-types-handling branch from 8ad113d to 757bbca Compare November 14, 2024 11:12
Base automatically changed from feat/batching-on-output-max-size to main November 15, 2024 21:48
@dorbanianas dorbanianas force-pushed the feat/different-prompt-types-handling branch from ddb3672 to 227ce6b Compare November 16, 2024 12:27
@@ -19,6 +20,31 @@ std::vector<nlohmann::json> CastVectorOfStructsToJson(Vector &struct_vector, int
return vector_json;
}

PromptDetails CreatePromptDetails(Connection &con, const nlohmann::json prompt_details_json) {
Copy link
Member

Choose a reason for hiding this comment

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

This should exist in some PromptRender type of class

@queryproc queryproc merged commit 4b8855e into main Nov 17, 2024
@queryproc queryproc deleted the feat/different-prompt-types-handling branch November 17, 2024 15:24
@queryproc queryproc mentioned this pull request Nov 19, 2024
15 tasks
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.

2 participants