Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

36 linhas
891B

  1. using System.Text.Json.Serialization;
  2. namespace OllamaService.Models
  3. {
  4. public class OllamaRequest
  5. {
  6. [JsonPropertyName("model")]
  7. public string Model { get; set; } = "";
  8. [JsonPropertyName("prompt")]
  9. public string Prompt { get; set; } = "";
  10. [JsonPropertyName("images")]
  11. public List<string> Images { get; set; } = new();
  12. [JsonPropertyName("stream")]
  13. public bool Stream { get; set; } = false;
  14. [JsonPropertyName("temperature")]
  15. public double Temperature { get; set; } = 0.01;
  16. [JsonPropertyName("top_p")]
  17. public double Top_p { get; set; } = 0.9;
  18. [JsonPropertyName("max_tokens")]
  19. public int Max_tokens { get; set; } = 400;
  20. }
  21. public class OllamaResponse
  22. {
  23. [JsonPropertyName("response")]
  24. public string Completion { get; set; } = "";
  25. }
  26. }