Skip to content

Add get methods for HuggingFaceTokenizer fields #2956

@ylwu-amzn

Description

@ylwu-amzn

Description

We need to get the tokenizer config like model maxLength. But now the HuggingFaceTokenizer class doesn't have get method for this. Suggest add get methods for HuggingFaceTokenizer fields.

One minor suggestion, return builder for configure method

      public void configure(Map<String, ?> arguments) {
            for (Map.Entry<String, ?> entry : arguments.entrySet()) {
                options.put(entry.getKey(), entry.getValue().toString());
            }
        }

change to

      public Builder configure(Map<String, ?> arguments) {
            for (Map.Entry<String, ?> entry : arguments.entrySet()) {
                options.put(entry.getKey(), entry.getValue().toString());
            }
            return this;
        }

References

  • list reference and related literature
  • list known implementations

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions