Skip to content

Commit 804914d

Browse files
algolia-botFluf22
andcommitted
feat(specs): add transformation copilot to ingestion (#3479) (generated) [skip ci]
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
1 parent ac0cadb commit 804914d

File tree

74 files changed

+3261
-57
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3261
-57
lines changed

Diff for: clients/algoliasearch-client-csharp/algoliasearch/Clients/IngestionClient.cs

+63
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,28 @@ public interface IIngestionClient
969969
/// <returns>ListTasksResponseV1</returns>
970970
ListTasksResponseV1 ListTasksV1(int? itemsPerPage = default, int? page = default, List<ActionType> action = default, bool? enabled = default, List<string> sourceID = default, List<string> destinationID = default, List<TriggerType> triggerType = default, TaskSortKeys? sort = default, OrderKeys? order = default, RequestOptions options = null, CancellationToken cancellationToken = default);
971971

972+
/// <summary>
973+
/// Retrieves a list of existing LLM transformation helpers.
974+
/// </summary>
975+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
976+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
977+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
978+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
979+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
980+
/// <returns>Task of TransformationModels</returns>
981+
Task<TransformationModels> ListTransformationModelsAsync(RequestOptions options = null, CancellationToken cancellationToken = default);
982+
983+
/// <summary>
984+
/// Retrieves a list of existing LLM transformation helpers. (Synchronous version)
985+
/// </summary>
986+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
987+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
988+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
989+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
990+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
991+
/// <returns>TransformationModels</returns>
992+
TransformationModels ListTransformationModels(RequestOptions options = null, CancellationToken cancellationToken = default);
993+
972994
/// <summary>
973995
/// Retrieves a list of transformations.
974996
/// </summary>
@@ -3282,6 +3304,47 @@ public ListTasksResponseV1 ListTasksV1(int? itemsPerPage = default, int? page =
32823304
AsyncHelper.RunSync(() => ListTasksV1Async(itemsPerPage, page, action, enabled, sourceID, destinationID, triggerType, sort, order, options, cancellationToken));
32833305

32843306

3307+
/// <summary>
3308+
/// Retrieves a list of existing LLM transformation helpers.
3309+
/// </summary>
3310+
///
3311+
/// Required API Key ACLs:
3312+
/// - addObject
3313+
/// - deleteIndex
3314+
/// - editSettings
3315+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
3316+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
3317+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
3318+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
3319+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
3320+
/// <returns>Task of TransformationModels</returns>
3321+
public async Task<TransformationModels> ListTransformationModelsAsync(RequestOptions options = null, CancellationToken cancellationToken = default)
3322+
{
3323+
var requestOptions = new InternalRequestOptions(options);
3324+
3325+
3326+
return await _transport.ExecuteRequestAsync<TransformationModels>(new HttpMethod("GET"), "/1/transformations/copilot", requestOptions, cancellationToken).ConfigureAwait(false);
3327+
}
3328+
3329+
3330+
/// <summary>
3331+
/// Retrieves a list of existing LLM transformation helpers. (Synchronous version)
3332+
/// </summary>
3333+
///
3334+
/// Required API Key ACLs:
3335+
/// - addObject
3336+
/// - deleteIndex
3337+
/// - editSettings
3338+
/// <param name="options">Add extra http header or query parameters to Algolia.</param>
3339+
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
3340+
/// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
3341+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
3342+
/// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
3343+
/// <returns>TransformationModels</returns>
3344+
public TransformationModels ListTransformationModels(RequestOptions options = null, CancellationToken cancellationToken = default) =>
3345+
AsyncHelper.RunSync(() => ListTransformationModelsAsync(options, cancellationToken));
3346+
3347+
32853348
/// <summary>
32863349
/// Retrieves a list of transformations.
32873350
/// </summary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Ingestion;
13+
14+
/// <summary>
15+
/// Model
16+
/// </summary>
17+
public partial class Model
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the Model class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public Model() { }
24+
/// <summary>
25+
/// Initializes a new instance of the Model class.
26+
/// </summary>
27+
/// <param name="fullname">fullname (required).</param>
28+
/// <param name="modelName">modelName (required).</param>
29+
/// <param name="systemPrompt">systemPrompt (required).</param>
30+
/// <param name="id">id (required).</param>
31+
/// <param name="provider">provider (required).</param>
32+
public Model(string fullname, string modelName, string systemPrompt, string id, string provider)
33+
{
34+
Fullname = fullname ?? throw new ArgumentNullException(nameof(fullname));
35+
ModelName = modelName ?? throw new ArgumentNullException(nameof(modelName));
36+
SystemPrompt = systemPrompt ?? throw new ArgumentNullException(nameof(systemPrompt));
37+
Id = id ?? throw new ArgumentNullException(nameof(id));
38+
Provider = provider ?? throw new ArgumentNullException(nameof(provider));
39+
}
40+
41+
/// <summary>
42+
/// Gets or Sets Fullname
43+
/// </summary>
44+
[JsonPropertyName("fullname")]
45+
public string Fullname { get; set; }
46+
47+
/// <summary>
48+
/// Gets or Sets ModelName
49+
/// </summary>
50+
[JsonPropertyName("modelName")]
51+
public string ModelName { get; set; }
52+
53+
/// <summary>
54+
/// Gets or Sets SystemPrompt
55+
/// </summary>
56+
[JsonPropertyName("systemPrompt")]
57+
public string SystemPrompt { get; set; }
58+
59+
/// <summary>
60+
/// Gets or Sets Id
61+
/// </summary>
62+
[JsonPropertyName("id")]
63+
public string Id { get; set; }
64+
65+
/// <summary>
66+
/// Gets or Sets Provider
67+
/// </summary>
68+
[JsonPropertyName("provider")]
69+
public string Provider { get; set; }
70+
71+
/// <summary>
72+
/// Returns the string presentation of the object
73+
/// </summary>
74+
/// <returns>String presentation of the object</returns>
75+
public override string ToString()
76+
{
77+
StringBuilder sb = new StringBuilder();
78+
sb.Append("class Model {\n");
79+
sb.Append(" Fullname: ").Append(Fullname).Append("\n");
80+
sb.Append(" ModelName: ").Append(ModelName).Append("\n");
81+
sb.Append(" SystemPrompt: ").Append(SystemPrompt).Append("\n");
82+
sb.Append(" Id: ").Append(Id).Append("\n");
83+
sb.Append(" Provider: ").Append(Provider).Append("\n");
84+
sb.Append("}\n");
85+
return sb.ToString();
86+
}
87+
88+
/// <summary>
89+
/// Returns the JSON string presentation of the object
90+
/// </summary>
91+
/// <returns>JSON string presentation of the object</returns>
92+
public virtual string ToJson()
93+
{
94+
return JsonSerializer.Serialize(this, JsonConfig.Options);
95+
}
96+
97+
/// <summary>
98+
/// Returns true if objects are equal
99+
/// </summary>
100+
/// <param name="obj">Object to be compared</param>
101+
/// <returns>Boolean</returns>
102+
public override bool Equals(object obj)
103+
{
104+
if (obj is not Model input)
105+
{
106+
return false;
107+
}
108+
109+
return
110+
(Fullname == input.Fullname || (Fullname != null && Fullname.Equals(input.Fullname))) &&
111+
(ModelName == input.ModelName || (ModelName != null && ModelName.Equals(input.ModelName))) &&
112+
(SystemPrompt == input.SystemPrompt || (SystemPrompt != null && SystemPrompt.Equals(input.SystemPrompt))) &&
113+
(Id == input.Id || (Id != null && Id.Equals(input.Id))) &&
114+
(Provider == input.Provider || (Provider != null && Provider.Equals(input.Provider)));
115+
}
116+
117+
/// <summary>
118+
/// Gets the hash code
119+
/// </summary>
120+
/// <returns>Hash code</returns>
121+
public override int GetHashCode()
122+
{
123+
unchecked // Overflow is fine, just wrap
124+
{
125+
int hashCode = 41;
126+
if (Fullname != null)
127+
{
128+
hashCode = (hashCode * 59) + Fullname.GetHashCode();
129+
}
130+
if (ModelName != null)
131+
{
132+
hashCode = (hashCode * 59) + ModelName.GetHashCode();
133+
}
134+
if (SystemPrompt != null)
135+
{
136+
hashCode = (hashCode * 59) + SystemPrompt.GetHashCode();
137+
}
138+
if (Id != null)
139+
{
140+
hashCode = (hashCode * 59) + Id.GetHashCode();
141+
}
142+
if (Provider != null)
143+
{
144+
hashCode = (hashCode * 59) + Provider.GetHashCode();
145+
}
146+
return hashCode;
147+
}
148+
}
149+
150+
}
151+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
//
2+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
//
4+
using System;
5+
using System.Text;
6+
using System.Linq;
7+
using System.Text.Json.Serialization;
8+
using System.Collections.Generic;
9+
using Algolia.Search.Serializer;
10+
using System.Text.Json;
11+
12+
namespace Algolia.Search.Models.Ingestion;
13+
14+
/// <summary>
15+
/// List of available AI models for transformation purposes.
16+
/// </summary>
17+
public partial class TransformationModels
18+
{
19+
/// <summary>
20+
/// Initializes a new instance of the TransformationModels class.
21+
/// </summary>
22+
[JsonConstructor]
23+
public TransformationModels() { }
24+
/// <summary>
25+
/// Initializes a new instance of the TransformationModels class.
26+
/// </summary>
27+
/// <param name="llms">llms (required).</param>
28+
public TransformationModels(List<Model> llms)
29+
{
30+
Llms = llms ?? throw new ArgumentNullException(nameof(llms));
31+
}
32+
33+
/// <summary>
34+
/// Gets or Sets Llms
35+
/// </summary>
36+
[JsonPropertyName("llms")]
37+
public List<Model> Llms { get; set; }
38+
39+
/// <summary>
40+
/// Returns the string presentation of the object
41+
/// </summary>
42+
/// <returns>String presentation of the object</returns>
43+
public override string ToString()
44+
{
45+
StringBuilder sb = new StringBuilder();
46+
sb.Append("class TransformationModels {\n");
47+
sb.Append(" Llms: ").Append(Llms).Append("\n");
48+
sb.Append("}\n");
49+
return sb.ToString();
50+
}
51+
52+
/// <summary>
53+
/// Returns the JSON string presentation of the object
54+
/// </summary>
55+
/// <returns>JSON string presentation of the object</returns>
56+
public virtual string ToJson()
57+
{
58+
return JsonSerializer.Serialize(this, JsonConfig.Options);
59+
}
60+
61+
/// <summary>
62+
/// Returns true if objects are equal
63+
/// </summary>
64+
/// <param name="obj">Object to be compared</param>
65+
/// <returns>Boolean</returns>
66+
public override bool Equals(object obj)
67+
{
68+
if (obj is not TransformationModels input)
69+
{
70+
return false;
71+
}
72+
73+
return
74+
(Llms == input.Llms || Llms != null && input.Llms != null && Llms.SequenceEqual(input.Llms));
75+
}
76+
77+
/// <summary>
78+
/// Gets the hash code
79+
/// </summary>
80+
/// <returns>Hash code</returns>
81+
public override int GetHashCode()
82+
{
83+
unchecked // Overflow is fine, just wrap
84+
{
85+
int hashCode = 41;
86+
if (Llms != null)
87+
{
88+
hashCode = (hashCode * 59) + Llms.GetHashCode();
89+
}
90+
return hashCode;
91+
}
92+
}
93+
94+
}
95+

0 commit comments

Comments
 (0)