Skip to content

Commit

Permalink
chore: update resource location (#2225)
Browse files Browse the repository at this point in the history
* update resource location

* fix typo

* update openai resources

* fix bug

* update nasaearth data

* update openai resource name in notebooks

* clean up
  • Loading branch information
JessicaXYWang authored May 20, 2024
1 parent a31b3f0 commit 5c37342
Show file tree
Hide file tree
Showing 12 changed files with 221 additions and 224 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class FormOntologyLearnerSuite extends EstimatorFuzzing[FormOntologyLearner] wit
.setOutputCol("unified_ontology")

lazy val urlDF: DataFrame = Seq(
"https://mmlsparkdemo.blob.core.windows.net/ignite2021/forms/2017/Invoice115991.pdf",
"https://mmlsparkdemo.blob.core.windows.net/ignite2021/forms/2018/Invoice119554.pdf",
"https://mmlsparkdemo.blob.core.windows.net/ignite2021/forms/2009/Invoice12241.pdf"
"https://mmlspark.blob.core.windows.net/publicwasb/form_test/Invoice115991.pdf",
"https://mmlspark.blob.core.windows.net/publicwasb/form_test/Invoice119554.pdf",
"https://mmlspark.blob.core.windows.net/publicwasb/form_test/Invoice12241.pdf"
).toDF("url")

lazy val tableUrlDF: DataFrame = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class OpenAIChatCompletionSuite extends TransformerFuzzing[OpenAIChatCompletion]

lazy val completion: OpenAIChatCompletion = new OpenAIChatCompletion()
.setDeploymentName(deploymentNameGpt4)
.setCustomServiceName(openAIServiceNameGpt4)
.setCustomServiceName(openAIServiceName)
.setApiVersion("2023-05-15")
.setMaxTokens(5000)
.setOutputCol("out")
.setMessagesCol("messages")
.setTemperature(0)
.setSubscriptionKey(openAIAPIKeyGpt4)
.setSubscriptionKey(openAIAPIKey)


lazy val goodDf: DataFrame = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import org.apache.spark.sql.{DataFrame, Row}
import org.scalactic.Equality

trait OpenAIAPIKey {
lazy val openAIAPIKey: String = sys.env.getOrElse("OPENAI_API_KEY", Secrets.OpenAIApiKey)
lazy val openAIServiceName: String = sys.env.getOrElse("OPENAI_SERVICE_NAME", "synapseml-openai")
lazy val openAIAPIKey: String = sys.env.getOrElse("OPENAI_API_KEY_2", Secrets.OpenAIApiKey)
lazy val openAIServiceName: String = sys.env.getOrElse("OPENAI_SERVICE_NAME_2", "synapseml-openai-2")
lazy val deploymentName: String = "gpt-35-turbo"
lazy val modelName: String = "gpt-35-turbo"
lazy val openAIAPIKeyGpt4: String = sys.env.getOrElse("OPENAI_API_KEY_2", Secrets.OpenAIApiKeyGpt4)
lazy val openAIServiceNameGpt4: String = sys.env.getOrElse("OPENAI_SERVICE_NAME_2", "synapseml-openai-2")
lazy val deploymentNameGpt4: String = "gpt-4"
lazy val modelNameGpt4: String = "gpt-4"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class OpenAIEmbeddingsSuite extends TransformerFuzzing[OpenAIEmbedding] with Ope
}

lazy val embeddingExtra: OpenAIEmbedding = new OpenAIEmbedding()
.setSubscriptionKey(openAIAPIKeyGpt4)
.setSubscriptionKey(openAIAPIKey)
.setDeploymentName("text-embedding-3-small")
.setApiVersion("2024-03-01-preview")
.setDimensions(100)
.setUser("testUser")
.setCustomServiceName(openAIServiceNameGpt4)
.setCustomServiceName(openAIServiceName)
.setTextCol("text")
.setOutputCol("out")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ object Secrets {
}

lazy val CognitiveApiKey: String = getSecret("cognitive-api-key")
lazy val OpenAIApiKey: String = getSecret("openai-api-key")
lazy val OpenAIApiKeyGpt4: String = getSecret("openai-api-key-2")
lazy val OpenAIApiKey: String = getSecret("openai-api-key-2")

lazy val CustomSpeechApiKey: String = getSecret("custom-speech-api-key")
lazy val ConversationTranscriptionUrl: String = getSecret("conversation-transcription-url")
Expand Down
Loading

0 comments on commit 5c37342

Please sign in to comment.