You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

LLamaTypes.cs 2.9 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using System;
  2. using System.Collections.Generic;
  3. #pragma warning disable
  4. // ReSharper disable all
  5. namespace LLama.OldVersion
  6. {
  7. public enum ChatRole
  8. {
  9. Human,
  10. Assistant
  11. }
  12. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  13. public record EmbeddingUsage(int PromptTokens, int TotalTokens);
  14. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  15. public record EmbeddingData(int Index, string Object, float[] Embedding);
  16. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  17. public record Embedding(string Object, string Model, EmbeddingData[] Data, EmbeddingUsage Usage);
  18. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  19. public record CompletionLogprobs(int[] TextOffset, float[] TokenLogProbs, string[] Tokens, Dictionary<string, float>[] TopLogprobs);
  20. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  21. public record CompletionChoice(string Text, int Index, CompletionLogprobs? Logprobs, string? FinishReason);
  22. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  23. public record CompletionUsage(int PromptTokens, int CompletionTokens, int TotalTokens);
  24. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  25. public record CompletionChunk(string Id, string Object, int Created, string Model, CompletionChoice[] Choices);
  26. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  27. public record Completion(string Id, string Object, int Created, string Model, CompletionChoice[] Choices, CompletionUsage Usage);
  28. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  29. public record ChatCompletionMessage(ChatRole Role, string Content, string? Name = null);
  30. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  31. public record ChatCompletionChoice(int Index, ChatCompletionMessage Message, string? FinishReason);
  32. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  33. public record ChatCompletion(string Id, string Object, int Created, string Model, ChatCompletionChoice[] Choices, CompletionUsage Usage);
  34. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  35. public record ChatCompletionChunkDelta(string? Role, string? Content);
  36. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  37. public record ChatCompletionChunkChoice(int Index, ChatCompletionChunkDelta Delta, string? FinishReason);
  38. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  39. public record ChatCompletionChunk(string Id, string Model, string Object, int Created, ChatCompletionChunkChoice[] Choices);
  40. [Obsolete("The entire LLama.OldVersion namespace will be removed")]
  41. public record ChatMessageRecord(ChatCompletionMessage Message, DateTime Time);
  42. }