langroid 0.42.1__py3-none-any.whl → 0.42.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langroid/language_models/model_info.py +9 -0
- langroid/prompts/templates.py +7 -4
- {langroid-0.42.1.dist-info → langroid-0.42.2.dist-info}/METADATA +1 -1
- {langroid-0.42.1.dist-info → langroid-0.42.2.dist-info}/RECORD +6 -6
- {langroid-0.42.1.dist-info → langroid-0.42.2.dist-info}/WHEEL +0 -0
- {langroid-0.42.1.dist-info → langroid-0.42.2.dist-info}/licenses/LICENSE +0 -0
@@ -63,6 +63,7 @@ class GeminiModel(ModelName):
|
|
63
63
|
GEMINI_1_5_FLASH = "gemini/gemini-1.5-flash"
|
64
64
|
GEMINI_1_5_FLASH_8B = "gemini/gemini-1.5-flash-8b"
|
65
65
|
GEMINI_1_5_PRO = "gemini/gemini-1.5-pro"
|
66
|
+
GEMINI_2_PRO = "gemini/gemini-2.0-pro-exp-02-05"
|
66
67
|
GEMINI_2_FLASH = "gemini/gemini-2.0-flash"
|
67
68
|
GEMINI_2_FLASH_LITE = "gemini/gemini-2.0-flash-lite-preview"
|
68
69
|
GEMINI_2_FLASH_THINKING = "gemini/gemini-2.0-flash-thinking-exp"
|
@@ -322,6 +323,14 @@ MODEL_INFO: Dict[str, ModelInfo] = {
|
|
322
323
|
rename_params={"max_tokens": "max_completion_tokens"},
|
323
324
|
description="Gemini 1.5 Pro",
|
324
325
|
),
|
326
|
+
GeminiModel.GEMINI_2_PRO.value: ModelInfo(
|
327
|
+
name=GeminiModel.GEMINI_2_PRO.value,
|
328
|
+
provider=ModelProvider.GOOGLE,
|
329
|
+
context_length=2_000_000,
|
330
|
+
max_output_tokens=8192,
|
331
|
+
rename_params={"max_tokens": "max_completion_tokens"},
|
332
|
+
description="Gemini 2 Pro Exp 02-05",
|
333
|
+
),
|
325
334
|
GeminiModel.GEMINI_2_FLASH_THINKING.value: ModelInfo(
|
326
335
|
name=GeminiModel.GEMINI_2_FLASH_THINKING.value,
|
327
336
|
provider=ModelProvider.GOOGLE,
|
langroid/prompts/templates.py
CHANGED
@@ -50,20 +50,23 @@ EXTRACTION_PROMPT = f"""
|
|
50
50
|
|
51
51
|
SUMMARY_ANSWER_PROMPT_GPT4 = f"""
|
52
52
|
|
53
|
-
Use the provided NUMBERED
|
54
|
-
If there's not enough information, respond with {NO_ANSWER}. Use
|
55
|
-
information in these extracts, even if your answer is factually incorrect
|
53
|
+
Use the provided NUMBERED EXTRACTS (with sources) to answer the QUESTION.
|
54
|
+
If there's not enough information, respond with {NO_ANSWER}. Use ONLY the
|
55
|
+
information in these extracts, even if your answer is factually incorrect.
|
56
56
|
and even if the answer contradicts other parts of the document. The only
|
57
57
|
important thing is that your answer is consistent with and supported by the
|
58
58
|
extracts. Compose your complete answer, inserting CITATIONS in MARKDOWN format
|
59
59
|
[^i][^j] where i,j,... are the extract NUMBERS you are
|
60
60
|
citing.
|
61
|
-
For
|
61
|
+
For EXAMPLE your answer might look like this (NOTE HOW multiple citations
|
62
62
|
are grouped as [^2][^5]):
|
63
63
|
|
64
|
+
<ExampleAnswer>
|
64
65
|
Beethoven composed the 9th symphony in 1824.[^1] After that he became deaf
|
65
66
|
and could not hear his own music. [^2][^5]. He was a prolific composer and
|
66
67
|
wrote many famous pieces.
|
68
|
+
</ExampleAnswer>
|
69
|
+
|
67
70
|
|
68
71
|
NUMBERED EXTRACTS:
|
69
72
|
|
@@ -71,7 +71,7 @@ langroid/language_models/azure_openai.py,sha256=zNQzzsERxNestq-hFfQZbvTzK43G2vjR
|
|
71
71
|
langroid/language_models/base.py,sha256=is4l3x858tdPHbrJU2jxJXe2j9PCGb9kk_c5nyfShxs,26150
|
72
72
|
langroid/language_models/config.py,sha256=9Q8wk5a7RQr8LGMT_0WkpjY8S4ywK06SalVRjXlfCiI,378
|
73
73
|
langroid/language_models/mock_lm.py,sha256=5BgHKDVRWFbUwDT_PFgTZXz9-k8wJSA2e3PZmyDgQ1k,4022
|
74
|
-
langroid/language_models/model_info.py,sha256=
|
74
|
+
langroid/language_models/model_info.py,sha256=azCXNr6uU_87CWjpGUoMcpXouqqhoaNmHBSLFSu7xTw,12276
|
75
75
|
langroid/language_models/openai_gpt.py,sha256=aajZ3ZvGkwI-3QdsNWgJ4QSyGpnyXJ5n4p2fYGUmdo4,77317
|
76
76
|
langroid/language_models/utils.py,sha256=L4_CbihDMTGcsg0TOG1Yd5JFEto46--h7CX_14m89sQ,5016
|
77
77
|
langroid/language_models/prompt_formatter/__init__.py,sha256=2-5cdE24XoFDhifOLl8yiscohil1ogbP1ECkYdBlBsk,372
|
@@ -98,7 +98,7 @@ langroid/parsing/web_search.py,sha256=wWSmV0METFTGPhHJIs-M4tog2Aur_75Pxr4a49cKDk
|
|
98
98
|
langroid/prompts/__init__.py,sha256=RW11vK6jiLPuaUh4GpeFvstti73gkm8_rDMtrbo2YsU,142
|
99
99
|
langroid/prompts/dialog.py,sha256=SpfiSyofSgy2pwD1YboHR_yHO3LEEMbv6j2sm874jKo,331
|
100
100
|
langroid/prompts/prompts_config.py,sha256=p_lp9nbMuQwhhMwAZsOxveRw9C0ZFZvql7pdIfgVZYo,143
|
101
|
-
langroid/prompts/templates.py,sha256=
|
101
|
+
langroid/prompts/templates.py,sha256=VV84HVf_amOx6xdWQyIsN9i5dNfrbl8rsfFp6hyfOss,6371
|
102
102
|
langroid/pydantic_v1/__init__.py,sha256=HxPGVERapVueRUORgSpj2JX_vTZxVlVbWvhpQlpjygE,283
|
103
103
|
langroid/pydantic_v1/main.py,sha256=p_k7kDY9eDrsA5dxNNqXusKLgx7mS_icGnS7fu4goqY,147
|
104
104
|
langroid/utils/__init__.py,sha256=Sruos2tB4G7Tn0vlblvYlX9PEGR0plI2uE0PJ4d_EC4,353
|
@@ -128,7 +128,7 @@ langroid/vector_store/pineconedb.py,sha256=otxXZNaBKb9f_H75HTaU3lMHiaR2NUp5MqwLZ
|
|
128
128
|
langroid/vector_store/postgres.py,sha256=DQHd6dt-OcV_QVNm-ymn28rlTfhI6hqgcpLTPCsm0jI,15990
|
129
129
|
langroid/vector_store/qdrantdb.py,sha256=v7TAsIoj_vxeKDYS9tpwJLBZA8fuTweTYxHo0X_uawM,17949
|
130
130
|
langroid/vector_store/weaviatedb.py,sha256=tjlqEtkwrhykelt-nbr2WIuHWJBuSAGjZuG6gsAMBsc,11753
|
131
|
-
langroid-0.42.
|
132
|
-
langroid-0.42.
|
133
|
-
langroid-0.42.
|
134
|
-
langroid-0.42.
|
131
|
+
langroid-0.42.2.dist-info/METADATA,sha256=5bP33R9jk2VqFHaD1DvD_yjhHFmWlFwcBERW2rkdOMo,61699
|
132
|
+
langroid-0.42.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
133
|
+
langroid-0.42.2.dist-info/licenses/LICENSE,sha256=EgVbvA6VSYgUlvC3RvPKehSg7MFaxWDsFuzLOsPPfJg,1065
|
134
|
+
langroid-0.42.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|