Skip to content

Commit

Permalink
Remove CapacityType
Browse files Browse the repository at this point in the history
  • Loading branch information
dargilco committed Jun 6, 2024
1 parent 907e4e1 commit 0aeb368
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 185 deletions.
1 change: 0 additions & 1 deletion specification/ai/ModelClient/client.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace Customizations; // The actual name here doesn't matter and is here for

// Since we made all operator methods internal, we need to expliclty say we still want the models they use
// to be public.
@@access(ModelClient.CapacityType, Access.public);
@@access(ModelClient.ChatChoice, Access.public);
@@access(ModelClient.ChatCompletions, Access.public);
@@access(ModelClient.ChatCompletionsFunctionToolCall, Access.public);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,46 @@
"role": "ChatRequestMessage"
}
],
"frequency_penalty": 0,
"frequency_penalty": -1,
"stream": true,
"presence_penalty": 1,
"temperature": 0,
"top_p": 0,
"max_tokens": 0,
"response_format": "text",
"stop": [
"cteiwbsdfipv"
"xvqcawyltsgxp"
],
"tools": [
{
"type": "ChatCompletionsToolDefinition"
}
],
"seed": 11
"seed": 7
}
},
"responses": {
"200": {
"body": {
"id": "bmvsapbvjgusxip",
"created": 25,
"model": "c",
"id": "j",
"created": 8,
"model": "seescrvpjgzsypchxgxfywnhaqo",
"usage": {
"capacity_type": "usage",
"completion_tokens": 11,
"prompt_tokens": 24,
"total_tokens": 28
"completion_tokens": 4,
"prompt_tokens": 11,
"total_tokens": 29
},
"choices": [
{
"index": 1,
"index": 22,
"finish_reason": "stop",
"message": {
"role": "system",
"content": "cawybqiubcroelaugj",
"content": "mypcazxgotv",
"tool_calls": [
{
"type": "ChatCompletionsToolCall",
"id": "pwiptrvzjdijeqoy"
"id": "rwnxvsfequsocsyxlj"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@
"responses": {
"200": {
"body": {
"id": "bmvsapbvjgusxip",
"created": 25,
"model": "c",
"id": "j",
"created": 8,
"model": "seescrvpjgzsypchxgxfywnhaqo",
"usage": {
"capacity_type": "usage",
"completion_tokens": 11,
"prompt_tokens": 24,
"total_tokens": 28
"completion_tokens": 4,
"prompt_tokens": 11,
"total_tokens": 29
},
"choices": [
{
"index": 1,
"index": 22,
"finish_reason": "stop",
"message": {
"role": "system",
"content": "cawybqiubcroelaugj"
"content": "mypcazxgotv"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,31 @@
"unknown-parameters": "error",
"body": {
"input": [
"vkcxwhlhba"
"lldxiwoooquzs"
],
"dimensions": 27,
"dimensions": 17,
"encoding_format": "base64",
"input_type": "text"
}
},
"responses": {
"200": {
"body": {
"id": "vocuiyeigedom",
"id": "bosctybzvexfttpdci",
"data": [
{
"embedding": [
11
22
],
"index": 7
"index": 10
}
],
"usage": {
"capacity_type": "usage",
"input_tokens": 11,
"prompt_tokens": 5,
"total_tokens": 18
"input_tokens": 12,
"prompt_tokens": 6,
"total_tokens": 12
},
"model": "tcxclltyrnhrfjqngtgyqrfdzkilqk"
"model": "qwtvuoqzjbkybpijoedy"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,28 @@
"api-version": "2024-05-01-preview",
"body": {
"input": [
"jpmehzhrcjufrurxmsepgtiufrdk"
"ykddkctmxmqgueem"
]
}
},
"responses": {
"200": {
"body": {
"id": "vocuiyeigedom",
"id": "bosctybzvexfttpdci",
"data": [
{
"embedding": [
11
22
],
"index": 7
"index": 10
}
],
"usage": {
"capacity_type": "usage",
"input_tokens": 11,
"prompt_tokens": 5,
"total_tokens": 18
"input_tokens": 12,
"prompt_tokens": 6,
"total_tokens": 12
},
"model": "tcxclltyrnhrfjqngtgyqrfdzkilqk"
"model": "qwtvuoqzjbkybpijoedy"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,33 @@
"body": {
"input": [
{
"image": "m",
"text": "nlskyzultivibrepqugzntgvqsa"
"image": "nqywwlco",
"text": "lwdsmegnaxqwwayjp"
}
],
"dimensions": 17,
"dimensions": 16,
"encoding_format": "base64",
"input_type": "text"
}
},
"responses": {
"200": {
"body": {
"id": "vocuiyeigedom",
"id": "bosctybzvexfttpdci",
"data": [
{
"embedding": [
11
22
],
"index": 7
"index": 10
}
],
"usage": {
"capacity_type": "usage",
"input_tokens": 11,
"prompt_tokens": 5,
"total_tokens": 18
"input_tokens": 12,
"prompt_tokens": 6,
"total_tokens": 12
},
"model": "tcxclltyrnhrfjqngtgyqrfdzkilqk"
"model": "qwtvuoqzjbkybpijoedy"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,29 @@
"body": {
"input": [
{
"image": "m"
"image": "nqywwlco"
}
]
}
},
"responses": {
"200": {
"body": {
"id": "vocuiyeigedom",
"id": "bosctybzvexfttpdci",
"data": [
{
"embedding": [
11
22
],
"index": 7
"index": 10
}
],
"usage": {
"capacity_type": "usage",
"input_tokens": 11,
"prompt_tokens": 5,
"total_tokens": 18
"input_tokens": 12,
"prompt_tokens": 6,
"total_tokens": 12
},
"model": "tcxclltyrnhrfjqngtgyqrfdzkilqk"
"model": "qwtvuoqzjbkybpijoedy"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"responses": {
"200": {
"body": {
"model_name": "puviy",
"model_name": "pvjlbwovpsotsvsioii",
"model_type": "embeddings",
"model_provider_name": "vlrodqwutbuydcxambssy"
"model_provider_name": "hjprgnvy"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"responses": {
"200": {
"body": {
"model_name": "puviy",
"model_name": "pvjlbwovpsotsvsioii",
"model_type": "embeddings",
"model_provider_name": "vlrodqwutbuydcxambssy"
"model_provider_name": "hjprgnvy"
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions specification/ai/ModelClient/models/chat_completions.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ Counts consider all tokens across prompts, choices, choice alternates, best_of g
other consumers.
""")
model CompletionsUsage {
...CapacityAlias;

@doc("The number of tokens generated across all completions emissions.")
completion_tokens: int32;

Expand Down
18 changes: 0 additions & 18 deletions specification/ai/ModelClient/models/common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ model EmbeddingItem {

@doc("Measurement of the amount of tokens used in this request and response.")
model EmbeddingsUsage {
...CapacityAlias;

@doc("Number of tokens in the request prompt.")
input_tokens: int32;

Expand Down Expand Up @@ -158,19 +156,3 @@ union UnknownParams {
@doc("The service will pass unknown parameters to the back-end AI model.")
pass_through: "pass_through",
}

alias CapacityAlias = {
@doc("Indicates whether your capacity has been affected by the usage amount (token count) reported here.")
capacity_type: CapacityType;
};

@doc("Whether your capacity has been affected by the usage amount (token count) reported here.")
union CapacityType {
string,

@doc("Your capacity has been affected by the usage amount (token count) reported here.")
usage: "usage",

@doc("Your capacity has not been affected by the usage amount (token count) reported here.")
fixed: "fixed",
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,47 +10,46 @@
"role": "ChatRequestMessage"
}
],
"frequency_penalty": 0,
"frequency_penalty": -1,
"stream": true,
"presence_penalty": 1,
"temperature": 0,
"top_p": 0,
"max_tokens": 0,
"response_format": "text",
"stop": [
"cteiwbsdfipv"
"xvqcawyltsgxp"
],
"tools": [
{
"type": "ChatCompletionsToolDefinition"
}
],
"seed": 11
"seed": 7
}
},
"responses": {
"200": {
"body": {
"id": "bmvsapbvjgusxip",
"created": 25,
"model": "c",
"id": "j",
"created": 8,
"model": "seescrvpjgzsypchxgxfywnhaqo",
"usage": {
"capacity_type": "usage",
"completion_tokens": 11,
"prompt_tokens": 24,
"total_tokens": 28
"completion_tokens": 4,
"prompt_tokens": 11,
"total_tokens": 29
},
"choices": [
{
"index": 1,
"index": 22,
"finish_reason": "stop",
"message": {
"role": "system",
"content": "cawybqiubcroelaugj",
"content": "mypcazxgotv",
"tool_calls": [
{
"type": "ChatCompletionsToolCall",
"id": "pwiptrvzjdijeqoy"
"id": "rwnxvsfequsocsyxlj"
}
]
}
Expand Down
Loading

0 comments on commit 0aeb368

Please sign in to comment.