Skip to content

Commit

Permalink
add v2 DES endpoints that include certification skills
Browse files Browse the repository at this point in the history
  • Loading branch information
JW Wesson committed Dec 26, 2024
1 parent 3de21dc commit 34ff560
Show file tree
Hide file tree
Showing 8 changed files with 584 additions and 4 deletions.
12 changes: 12 additions & 0 deletions src/Textkernel.Tx.SDK/ApiEndpoints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ private string Sanitize(string indexOrDocId)
internal HttpRequestMessage DESSkillsExtract() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/Extract");
internal HttpRequestMessage DESSkillsLookup() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/Lookup");
internal HttpRequestMessage DESSkillsAutoComplete() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/AutoComplete");
internal HttpRequestMessage DESSkillsGetTaxonomyV2(TaxonomyFormat format) => new HttpRequestMessage(HttpMethod.Get, $"{Prefix()}skills/v2/Taxonomy?format={format}");
internal HttpRequestMessage DESGetSkillsMetadataV2() => new HttpRequestMessage(HttpMethod.Get, $"{Prefix()}skills/v2/Metadata");
internal HttpRequestMessage DESSkillsNormalizeV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/v2/Normalize");
internal HttpRequestMessage DESSkillsExtractV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/v2/Extract");
internal HttpRequestMessage DESSkillsLookupV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/v2/Lookup");
internal HttpRequestMessage DESSkillsAutoCompleteV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}skills/v2/AutoComplete");
internal HttpRequestMessage DESProfessionsGetTaxonomy(TaxonomyFormat format, string language) => new HttpRequestMessage(HttpMethod.Get, $"{Prefix()}professions/Taxonomy?format={format}&language={language}");
internal HttpRequestMessage DESGetProfessionsMetadata() => new HttpRequestMessage(HttpMethod.Get, $"{Prefix()}professions/Metadata");
internal HttpRequestMessage DESProfessionsNormalize() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}professions/Normalize");
Expand All @@ -113,6 +119,12 @@ private string Sanitize(string indexOrDocId)
internal HttpRequestMessage DESOntologySuggestProfessions() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/suggest-professions");
internal HttpRequestMessage DESOntologyCompareSkillsToProfessions() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/compare-skills-to-profession");
internal HttpRequestMessage DESOntologySkillsSimilarityScore() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/skills-similarity-score");
internal HttpRequestMessage DESOntologySuggestSkillsFromProfessionsV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/suggest-skills-from-professions");
internal HttpRequestMessage DESOntologySuggestSkillsFromSkillsV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/suggest-skills-from-skills");
internal HttpRequestMessage DESOntologyCompareProfessionsV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/compare-professions");
internal HttpRequestMessage DESOntologySuggestProfessionsV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/suggest-professions");
internal HttpRequestMessage DESOntologyCompareSkillsToProfessionsV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/compare-skills-to-profession");
internal HttpRequestMessage DESOntologySkillsSimilarityScoreV2() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}ontology/v2/skills-similarity-score");

internal HttpRequestMessage JobDescriptionGenerate() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}job-description/generate");
internal HttpRequestMessage JobDescriptionSuggestSkills() => new HttpRequestMessage(HttpMethod.Post, $"{Prefix()}job-description/suggest-skills");
Expand Down
297 changes: 297 additions & 0 deletions src/Textkernel.Tx.SDK/ITxClient.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,10 @@ public class SuggestSkillsFromProfessionsRequest
/// The language to use for the returned descriptions.
/// </summary>
public string OutputLanguage { get; set; }

/// <summary>
/// If specified, only these types of skills will be returned. The following values are acceptable: Professional, IT, Language, Soft, Certification, All. Only applicable in v2 endpoints.
/// </summary>
public List<string> Types { get; set; } = new List<string> { };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ public class SuggestSkillsFromSkillsRequest
/// The language to use for the returned descriptions.
/// </summary>
public string OutputLanguage { get; set; }

/// <summary>
/// If specified, only these types of skills will be returned. The following values are acceptable: Professional, IT, Language, Soft, Certification, All. Only applicable in v2 endpoints.
/// </summary>
public List<string> Types { get; set; } = new List<string> { };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Textkernel.Tx.Models.API.DataEnrichment.Skills.Request
public class SkillsAutoCompleteRequest : AutocompleteRequest
{
/// <summary>
/// If specified, only these types of skills will be returned. The following values are acceptable: Professional, IT, Language, Soft, All.
/// If specified, only these types of skills will be returned. The following values are acceptable: Professional, IT, Language, Soft, Certification (only when using v2 endpoints), All.
/// </summary>
public List<string> Types { get; set; } = new List<string> { };
}
Expand Down
2 changes: 1 addition & 1 deletion src/Textkernel.Tx.SDK/Models/DataEnrichment/Skill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class Skill
public string Id { get; set; }

/// <summary>
/// Type of skill. Possible values are Professional, IT, Language, or Soft.
/// Type of skill. Possible values are Professional, IT, Language, Soft, or Certification (only when using v2 endpoints).
/// </summary>
public string Type { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion src/Textkernel.Tx.SDK/Textkernel.Tx.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

<ItemGroup>

<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 34ff560

Please sign in to comment.