File tree Expand file tree Collapse file tree 5 files changed +30
-7
lines changed
Expand file tree Collapse file tree 5 files changed +30
-7
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @utcp/sdk" ,
3- "version" : " 1.0.6 " ,
3+ "version" : " 1.0.7 " ,
44 "description" : " Universal Tool Calling Protocol SDK" ,
55 "main" : " dist/index.cjs" ,
66 "module" : " dist/index.js" ,
Original file line number Diff line number Diff line change @@ -183,7 +183,9 @@ export class InMemConcurrentToolRepository implements ConcurrentToolRepository {
183183
184184export class InMemConcurrentToolRepositorySerializer extends Serializer < InMemConcurrentToolRepository > {
185185 toDict ( obj : InMemConcurrentToolRepository ) : { [ key : string ] : any } {
186- return obj . toDict ( ) ;
186+ return {
187+ tool_repository_type : obj . tool_repository_type
188+ }
187189 }
188190
189191 validateDict ( data : { [ key : string ] : any } ) : InMemConcurrentToolRepository {
Original file line number Diff line number Diff line change @@ -186,7 +186,16 @@ type FilterDictPostProcessorConfig = z.infer<typeof FilterDictPostProcessorConfi
186186
187187export class FilterDictPostProcessorSerializer extends Serializer < FilterDictPostProcessor > {
188188 toDict ( obj : FilterDictPostProcessor ) : { [ key : string ] : any } {
189- return obj . toDict ( ) ;
189+ const filterDictConfig = obj . toDict ( )
190+ return {
191+ tool_post_processor_type : filterDictConfig . tool_post_processor_type ,
192+ exclude_keys : filterDictConfig . exclude_keys ,
193+ only_include_keys : filterDictConfig . only_include_keys ,
194+ exclude_tools : filterDictConfig . exclude_tools ,
195+ only_include_tools : filterDictConfig . only_include_tools ,
196+ exclude_manuals : filterDictConfig . exclude_manuals ,
197+ only_include_manuals : filterDictConfig . only_include_manuals ,
198+ } ;
190199 }
191200
192201 validateDict ( data : { [ key : string ] : any } ) : FilterDictPostProcessor {
Original file line number Diff line number Diff line change @@ -124,7 +124,15 @@ type LimitStringsPostProcessorConfig = z.infer<typeof LimitStringsPostProcessorC
124124
125125export class LimitStringsPostProcessorSerializer extends Serializer < LimitStringsPostProcessor > {
126126 toDict ( obj : LimitStringsPostProcessor ) : { [ key : string ] : any } {
127- return obj . toDict ( ) ;
127+ const limitStringsConfig = obj . toDict ( )
128+ return {
129+ tool_post_processor_type : limitStringsConfig . tool_post_processor_type ,
130+ limit : limitStringsConfig . limit ,
131+ exclude_tools : limitStringsConfig . exclude_tools ,
132+ only_include_tools : limitStringsConfig . only_include_tools ,
133+ exclude_manuals : limitStringsConfig . exclude_manuals ,
134+ only_include_manuals : limitStringsConfig . only_include_manuals ,
135+ } ;
128136 }
129137
130138 validateDict ( data : { [ key : string ] : any } ) : LimitStringsPostProcessor {
Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ import { Serializer } from '../interfaces/serializer';
1111 */
1212export class TagSearchStrategy implements ToolSearchStrategy {
1313 public readonly tool_search_strategy_type : 'tag_and_description_word_match' = 'tag_and_description_word_match' ;
14- private readonly descriptionWeight : number ;
15- private readonly tagWeight : number ;
14+ public readonly descriptionWeight : number ;
15+ public readonly tagWeight : number ;
1616 private readonly _config : TagSearchStrategyConfig ;
1717
1818 /**
@@ -126,7 +126,11 @@ export class TagSearchStrategy implements ToolSearchStrategy {
126126
127127export class TagSearchStrategyConfigSerializer extends Serializer < TagSearchStrategy > {
128128 toDict ( obj : TagSearchStrategy ) : { [ key : string ] : any } {
129- return { ...obj } ;
129+ return {
130+ tool_search_strategy_type : obj . tool_search_strategy_type ,
131+ description_weight : obj . descriptionWeight ,
132+ tag_weight : obj . tagWeight
133+ }
130134 }
131135
132136 validateDict ( data : { [ key : string ] : any } ) : TagSearchStrategy {
You can’t perform that action at this time.
0 commit comments