@@ -143,7 +143,7 @@ import os
143143
144144
145145with Glean(
146- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
146+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
147147) as glean:
148148
149149 res = glean.client.chat.create(messages = [
@@ -173,7 +173,7 @@ import os
173173async def main ():
174174
175175 async with Glean(
176- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
176+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
177177 ) as glean:
178178
179179 res = await glean.client.chat.create_async(messages = [
@@ -201,7 +201,7 @@ import os
201201
202202
203203with Glean(
204- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
204+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
205205) as glean:
206206
207207 res = glean.client.chat.create_stream(messages = [
@@ -231,7 +231,7 @@ import os
231231async def main ():
232232
233233 async with Glean(
234- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
234+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
235235 ) as glean:
236236
237237 res = await glean.client.chat.create_stream_async(messages = [
@@ -269,7 +269,7 @@ import os
269269
270270
271271with Glean(
272- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
272+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
273273) as glean:
274274
275275 res = glean.agents.search(name = " HR Policy Agent" )
@@ -639,10 +639,10 @@ import os
639639
640640
641641with Glean(
642- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
642+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
643643) as glean:
644644
645- res = glean.chat.create_stream(input = " Summarize our parental leave policy as JSON." , store = True , text = {
645+ res = glean.chat.create_stream(input = " Summarize our parental leave policy as JSON." , store = True , model = " GPT5_6_LUNA " , text = {
646646 " format_" : {
647647 " type" : models.PlatformChatJSONSchemaFormatType.JSON_SCHEMA ,
648648 " name" : " policy_summary" ,
@@ -693,7 +693,7 @@ import os
693693
694694
695695with Glean(
696- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
696+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
697697) as glean:
698698
699699 res = glean.skills.create(file = {
@@ -720,7 +720,7 @@ import os
720720
721721
722722with Glean(
723- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
723+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
724724) as glean:
725725
726726 res = glean.agents.search(name = " HR Policy Agent" ,
@@ -740,7 +740,7 @@ import os
740740
741741with Glean(
742742 retry_config = RetryConfig(" backoff" , BackoffStrategy(1 , 50 , 1.1 , 100 ), False ),
743- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
743+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
744744) as glean:
745745
746746 res = glean.agents.search(name = " HR Policy Agent" )
@@ -856,7 +856,7 @@ import os
856856with Glean(
857857 server_idx = 0 ,
858858 instance = " instance-name" ,
859- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
859+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
860860) as glean:
861861
862862 res = glean.agents.search(name = " HR Policy Agent" )
@@ -876,7 +876,7 @@ import os
876876
877877with Glean(
878878 server_url = " https://instance-name-be.glean.com" ,
879- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
879+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
880880) as glean:
881881
882882 res = glean.agents.search(name = " HR Policy Agent" )
@@ -895,7 +895,7 @@ import os
895895
896896
897897with Glean(
898- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
898+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
899899) as glean:
900900
901901 res = glean.indexing.datasources.submit(datasource_instance = " <value>" , type_ = " <value>" , request_body = {
@@ -1018,18 +1018,20 @@ import os
10181018def main ():
10191019
10201020 with Glean(
1021- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
1021+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
10221022 ) as glean:
10231023 # Rest of application here...
1024+ pass
10241025
10251026
10261027# Or when using async:
10271028async def amain ():
10281029
10291030 async with Glean(
1030- api_token = os.getenv(" GLEAN_API_TOKEN" , " " ),
1031+ api_token = os.getenv(" GLEAN_API_TOKEN" ),
10311032 ) as glean:
10321033 # Rest of application here...
1034+ pass
10331035```
10341036<!-- End Resource Management [resource-management] -->
10351037
0 commit comments