Skip to content

Commit

Permalink
fix(js): Make llm.system and llm.provider available from LLMAttribute…
Browse files Browse the repository at this point in the history
…Postfixes
  • Loading branch information
cephalization committed Nov 25, 2024
1 parent 09e702f commit 6b5263e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const SemanticAttributePrefixes = {
} as const;

export const LLMAttributePostfixes = {
provider: "provider",
system: "system",
model_name: "model_name",
token_count: "token_count",
input_messages: "input_messages",
Expand Down Expand Up @@ -165,12 +167,13 @@ export const LLM_MODEL_NAME =
* The provider of the inferences. E.g. the cloud provider
*/
export const LLM_PROVIDER =
`${SemanticAttributePrefixes.llm}.provider` as const;
`${SemanticAttributePrefixes.llm}.${LLMAttributePostfixes.provider}` as const;

/**
* The AI product as identified by the client or server
*/
export const LLM_SYSTEM = `${SemanticAttributePrefixes.llm}.system` as const;
export const LLM_SYSTEM =
`${SemanticAttributePrefixes.llm}.${LLMAttributePostfixes.system}` as const;

/** Token count for the completion by the llm */
export const LLM_TOKEN_COUNT_COMPLETION =
Expand Down

0 comments on commit 6b5263e

Please sign in to comment.