-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add Assitant Object support in Java Generator
- Change Embedding implementation to use common util classes to call saia.
- Loading branch information
Showing
12 changed files
with
433 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
77 changes: 0 additions & 77 deletions
77
gxembedding/src/main/java/com/genexus/embedding/EmbeddingService.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
java/src/main/java/com/genexus/util/saia/OpenAIRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
package com.genexus.util.saia; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.genexus.util.GXProperty; | ||
|
||
import java.util.List; | ||
|
||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class OpenAIRequest { | ||
|
||
@JsonProperty("model") | ||
private String model; | ||
|
||
@JsonProperty("prompt") | ||
private String prompt; | ||
|
||
@JsonProperty("input") | ||
private List<String> input; | ||
|
||
@JsonProperty("max_tokens") | ||
private Integer maxTokens; | ||
|
||
@JsonProperty("temperature") | ||
private Double temperature; | ||
|
||
@JsonProperty("stream") | ||
private Boolean stream; | ||
|
||
@JsonProperty("stop") | ||
private List<String> stop; | ||
|
||
@JsonProperty("presence_penalty") | ||
private Double presencePenalty; | ||
|
||
@JsonProperty("frequency_penalty") | ||
private Double frequencyPenalty; | ||
|
||
@JsonProperty("user") | ||
private String user; | ||
|
||
@JsonProperty("variables") | ||
private List<GXProperty> variables; | ||
|
||
@JsonProperty("dimensions") | ||
private int dimension; | ||
|
||
public String getModel() { return model; } | ||
public void setModel(String model) { this.model = model; } | ||
|
||
public String getPrompt() { return prompt; } | ||
public void setPrompt(String prompt) { this.prompt = prompt; } | ||
|
||
public List<String> getInput() { return input; } | ||
public void setInput(List<String> input) { this.input = input; } | ||
|
||
public Integer getMaxTokens() { return maxTokens; } | ||
public void setMaxTokens(Integer maxTokens) { this.maxTokens = maxTokens; } | ||
|
||
public Double getTemperature() { return temperature; } | ||
public void setTemperature(Double temperature) { this.temperature = temperature; } | ||
|
||
public Boolean getStream() { return stream; } | ||
public void setStream(Boolean stream) { this.stream = stream; } | ||
|
||
public List<String> getStop() { return stop; } | ||
public void setStop(List<String> stop) { this.stop = stop; } | ||
|
||
public Double getPresencePenalty() { return presencePenalty; } | ||
public void setPresencePenalty(Double presencePenalty) { this.presencePenalty = presencePenalty; } | ||
|
||
public Double getFrequencyPenalty() { return frequencyPenalty; } | ||
public void setFrequencyPenalty(Double frequencyPenalty) { this.frequencyPenalty = frequencyPenalty; } | ||
|
||
public String getUser() { return user; } | ||
public void setUser(String user) { this.user = user; } | ||
|
||
public List<GXProperty> getVariables() { return variables; } | ||
public void setVariables(List<GXProperty> variables) { this.variables = variables; } | ||
|
||
public int getDimension() { return dimension; } | ||
public void setDimension(int dimension) { this.dimension = dimension; } | ||
} |
Oops, something went wrong.