Azure example
Requirements
Deployed models in Azure AI
Set environment variable AZURE_ENDPOINT_URL_AND_KEY to contain all the models that you have hosted on Azure
Example for multiple models deployed in Azure (separated by , ):
AZURE_ENDPOINT_URL_AND_KEY=https://model_1_link:api_key_1,https://model_2_link:api_key_2
List available models
[ ]:
from edsl import Model
azure_models = Model.available(service="azure")
azure_models
Model Name | Service Name | |
---|---|---|
0 | azure:gpt-4o-test | azure |
1 | azure:gpt-4o-mini-test | azure |
2 | Mistral-Large-2411-thgdv | azure |
Run survey using models hosted on Azure
[ ]:
from edsl import QuestionFreeText
from edsl import Model
for model_name in azure_models:
print("#############")
print(model_name[0])
model = Model(model_name[0])
question = QuestionFreeText(question_name="q1",question_text="How many satellites are in space?")
res = question.by(model).run(disable_remote_inference=True,cache=False)
print(res.select("answer.*").print())
#############
azure:gpt-4o-test
answer.q1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As of 2023, there are over 7,000 satellites in space. This number includes both operational satellites and those that are no longer functioning but remain in orbit. The number of satellites is continuously increasing due to the growing demand for satellite-based services, such as communication, navigation, and Earth observation.
#############
azure:gpt-4o-mini-test
answer.q1
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
As of October 2023, there are thousands of satellites currently in orbit around Earth. The exact number is constantly changing due to new satellite launches and decommissioning of older ones. Reports indicate that there are over 3,500 operational satellites in orbit, with many more non-operational or defunct satellites contributing to the overall count. Additionally, the number of small satellites and CubeSats has been increasing rapidly in recent years due to advancements in technology and reduced launch costs. For the most accurate and up-to-date information, it’s best to check resources like the Union of Concerned Scientists’ satellite database or relevant space agencies.
#############
Mistral-Large-2411-thgdv
answer.q1
-----------
As of my last update in October 2023, the exact number of satellites in space can vary frequently due to new launches and decommissioning of old satellites. However, it is estimated that there are thousands of operational satellites in orbit around Earth. This number includes satellites used for various purposes such as communication, navigation, Earth observation, scientific research, and military applications.
In addition to operational satellites, there are also numerous pieces of space debris, including defunct satellites and other objects, which add to the overall count of man-made objects in space.
For the most current and precise information, you can refer to databases maintained by organizations such as the United Nations Office for Outer Space Affairs (UNOOSA), the Union of Concerned Scientists, or space agencies like NASA and ESA.
AWS Bedrock
Set envariable variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
List available models
[ ]:
from edsl import Model
aws_bedrock_models = Model.available(service="bedrock")
aws_bedrock_models
Model Name | Service Name | |
---|---|---|
0 | amazon.titan-tg1-large | bedrock |
1 | amazon.titan-image-generator-v1:0 | bedrock |
2 | amazon.titan-image-generator-v1 | bedrock |
3 | amazon.titan-image-generator-v2:0 | bedrock |
4 | amazon.titan-text-premier-v1:0 | bedrock |
5 | amazon.nova-pro-v1:0:300k | bedrock |
6 | amazon.nova-pro-v1:0 | bedrock |
7 | amazon.nova-lite-v1:0:300k | bedrock |
8 | amazon.nova-lite-v1:0 | bedrock |
9 | amazon.nova-canvas-v1:0 | bedrock |
10 | amazon.nova-reel-v1:0 | bedrock |
11 | amazon.nova-micro-v1:0:128k | bedrock |
12 | amazon.nova-micro-v1:0 | bedrock |
13 | amazon.titan-embed-g1-text-02 | bedrock |
14 | amazon.titan-text-lite-v1:0:4k | bedrock |
15 | amazon.titan-text-lite-v1 | bedrock |
16 | amazon.titan-text-express-v1:0:8k | bedrock |
17 | amazon.titan-text-express-v1 | bedrock |
18 | amazon.titan-embed-text-v1:2:8k | bedrock |
19 | amazon.titan-embed-text-v1 | bedrock |
20 | amazon.titan-embed-text-v2:0:8k | bedrock |
21 | amazon.titan-embed-text-v2:0 | bedrock |
22 | amazon.titan-embed-image-v1:0 | bedrock |
23 | amazon.titan-embed-image-v1 | bedrock |
24 | stability.stable-diffusion-xl-v1:0 | bedrock |
25 | stability.stable-diffusion-xl-v1 | bedrock |
26 | ai21.j2-ultra-v1:0:8k | bedrock |
27 | ai21.jamba-instruct-v1:0 | bedrock |
28 | ai21.jamba-1-5-large-v1:0 | bedrock |
29 | ai21.jamba-1-5-mini-v1:0 | bedrock |
30 | anthropic.claude-instant-v1:2:100k | bedrock |
31 | anthropic.claude-instant-v1 | bedrock |
32 | anthropic.claude-v2:0:18k | bedrock |
33 | anthropic.claude-v2:0:100k | bedrock |
34 | anthropic.claude-v2:1:18k | bedrock |
35 | anthropic.claude-v2:1:200k | bedrock |
36 | anthropic.claude-v2:1 | bedrock |
37 | anthropic.claude-v2 | bedrock |
38 | anthropic.claude-3-sonnet-20240229-v1:0:28k | bedrock |
39 | anthropic.claude-3-sonnet-20240229-v1:0:200k | bedrock |
40 | anthropic.claude-3-sonnet-20240229-v1:0 | bedrock |
41 | anthropic.claude-3-haiku-20240307-v1:0:48k | bedrock |
42 | anthropic.claude-3-haiku-20240307-v1:0:200k | bedrock |
43 | anthropic.claude-3-haiku-20240307-v1:0 | bedrock |
44 | anthropic.claude-3-opus-20240229-v1:0:12k | bedrock |
45 | anthropic.claude-3-opus-20240229-v1:0:28k | bedrock |
46 | anthropic.claude-3-opus-20240229-v1:0:200k | bedrock |
47 | anthropic.claude-3-opus-20240229-v1:0 | bedrock |
48 | anthropic.claude-3-5-sonnet-20240620-v1:0 | bedrock |
49 | anthropic.claude-3-5-sonnet-20241022-v2:0 | bedrock |
50 | anthropic.claude-3-7-sonnet-20250219-v1:0 | bedrock |
51 | anthropic.claude-3-5-haiku-20241022-v1:0 | bedrock |
52 | cohere.command-text-v14:7:4k | bedrock |
53 | cohere.command-text-v14 | bedrock |
54 | cohere.command-r-v1:0 | bedrock |
55 | cohere.command-r-plus-v1:0 | bedrock |
56 | cohere.command-light-text-v14:7:4k | bedrock |
57 | cohere.command-light-text-v14 | bedrock |
58 | cohere.embed-english-v3:0:512 | bedrock |
59 | cohere.embed-english-v3 | bedrock |
60 | cohere.embed-multilingual-v3:0:512 | bedrock |
61 | cohere.embed-multilingual-v3 | bedrock |
62 | meta.llama3-8b-instruct-v1:0 | bedrock |
63 | meta.llama3-70b-instruct-v1:0 | bedrock |
64 | meta.llama3-1-8b-instruct-v1:0 | bedrock |
65 | meta.llama3-1-70b-instruct-v1:0 | bedrock |
66 | meta.llama3-2-11b-instruct-v1:0 | bedrock |
67 | meta.llama3-2-90b-instruct-v1:0 | bedrock |
68 | meta.llama3-2-1b-instruct-v1:0 | bedrock |
69 | meta.llama3-2-3b-instruct-v1:0 | bedrock |
70 | meta.llama3-3-70b-instruct-v1:0 | bedrock |
71 | mistral.mistral-7b-instruct-v0:2 | bedrock |
72 | mistral.mixtral-8x7b-instruct-v0:1 | bedrock |
73 | mistral.mistral-large-2402-v1:0 | bedrock |
74 | mistral.mistral-small-2402-v1:0 | bedrock |
Run Survey using AWS hosted models
[ ]:
from edsl import QuestionFreeText
from edsl import Model
for model_name in aws_bedrock_models[0:2]:
print("#############")
print(model_name[0])
model = Model(model_name[0])
question = QuestionFreeText(question_name="q1",question_text="How many satellites are in space?")
res = question.by(model).run(disable_remote_inference=True,cache=False)
print(res.select("answer.*").print())
#############
amazon.titan-text-express-v1
answer.q1
---------------------------------------------------------------------------------------------------------
There are over 5000 satellites in space. The majority of these are owned by the United States and Russia.
#############
amazon.titan-text-lite-v1
answer.q1
------------------------------------------------------------------------------------------------------------------
As of my knowledge cutoff date of 1/1/2023, there were an estimated 2,354 operational satellites in Earth's orbit.