This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #451 from Jaseci-Labs/removing-llm-packages
[Chore] Removing LLM Packages from the Repo
- Loading branch information
Showing
47 changed files
with
72 additions
and
972 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
import:py from jaclang.core.llms, Anthropic, Ollama, Groq; | ||
import:py from mtllm.llms, OpenAI; | ||
|
||
# glob llm = Anthropic(model_name="claude-3-sonnet-20240229"); | ||
# glob llm = Ollama(model_name="phi3"); | ||
glob llm = Groq(); | ||
glob llm = OpenAI(); | ||
|
||
can get_expert(question: str) -> 'Best Expert to Answer the Question': str by llm(method='Reason'); | ||
can get_answer(question: str, expert: str) -> str by llm(); | ||
|
||
can 'Finds the best professional to answer the given question' | ||
get_expert(question: 'Question': str)-> 'Expert Profession': str by llm(reason=True); | ||
can "Get the answer for the question from expert's perspective" | ||
get_answer(question:'Question': str, expert: 'Expert': str)-> "Expert's Answer": str by llm(temperature=1.0); | ||
|
||
with entry{ | ||
with entry { | ||
question = "What are Large Language Models?"; | ||
expert = get_expert(question); | ||
answer = get_answer(question, expert); | ||
print(f"For instance, {expert} would answer '{answer}' for the question '{question}'"); | ||
} | ||
print(f"{expert} says: '{answer}' "); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,15 @@ | ||
import:py from jaclang.core.llms, Anthropic, Ollama, Groq; | ||
import:py from mtllm.llms, OpenAI; | ||
|
||
# glob llm = Anthropic(model_name="claude-3-sonnet-20240229"); | ||
# glob llm = Ollama(model_name="phi3"); | ||
glob llm = Groq(); | ||
glob llm = OpenAI(model_name="gpt-4o"); | ||
|
||
|
||
glob examples: 'Examples for Picking Odd Word out': list[dict] = [ | ||
{ | ||
"OPTIONS": ["skirt", "dress", "pen", "jacket"], | ||
"REASONING": "skirt is clothing, dress is clothing, pen is an object, jacket is clothing.", | ||
"RESULT": "pen" | ||
}, | ||
{ | ||
"OPTIONS": ["Spain", "France", "German", "England", "Singapore"], | ||
"REASONING": "Spain is a country, France is a country, German is a language, ...", | ||
"RESULT": "German" | ||
} | ||
glob examples: 'Examples for Picking Odd Word out (Options, Reasoing, Result)': list[tuple[list[str], str, str]] = [ | ||
(["skirt", "dress", "pen", "jacket"], "skirt is clothing, dress is clothing, pen is an object, jacket is clothing.", "pen"), | ||
(["Spain", "France", "German", "England", "Singapore"], "Spain, France, England, Singapore is a country, German is a language.", "German") | ||
]; | ||
|
||
can 'Pick only the Odd word out' | ||
pick_odd_word_out_v1(options: 'Options to pick from': list[str]) -> 'RESULT': str | ||
by llm(reason=True, incl_info=(examples)); | ||
|
||
can 'Pick the Odd word out with reasoning' | ||
pick_odd_word_out_v2(options: 'Options to pick from': list[str]) -> 'OPTIONS, REASONING & RESULT': dict[str, any] | ||
by llm(incl_info=(examples)); | ||
can 'Pick the Odd word out' | ||
odd_word_out(options: 'Options to pick from': list[str]) -> 'REASONING & RESULT': tuple[str, str] by llm(incl_info=(examples)); | ||
|
||
with entry { | ||
options = ["Bentley", "Ferrari", "Lamborghini", "Casio", "Toyota"]; | ||
print(pick_odd_word_out_v1(options)); | ||
print(pick_odd_word_out_v2(options)); | ||
} | ||
print(odd_word_out(["Bentley", "Ferrari", "Lamborghini", "Casio", "Toyota"])); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.