Skip to content

Commit 37feb1d

Browse files
authored
Update language_models.md - Add Gemini (AIS) instructions (#8127)
1 parent 44ffb3e commit 37feb1d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/docs/learn/programming/language_models.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ dspy.configure(lm=lm)
2323
dspy.configure(lm=lm)
2424
```
2525

26+
=== "Gemini (AI Studio)"
27+
You can authenticate by setting the GEMINI_API_KEY env variable or passing `api_key` below.
28+
29+
```python linenums="1"
30+
import dspy
31+
lm = dspy.LM('gemini/gemini-2.5-pro-preview-03-25', api_key='GEMINI_API_KEY')
32+
dspy.configure(lm=lm)
33+
```
34+
2635
=== "Anthropic"
2736
You can authenticate by setting the ANTHROPIC_API_KEY env variable or passing `api_key` below.
2837

0 commit comments

Comments
 (0)