Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open_Source_LLM Tool - Restore Dynamic List + Fixes #1076

Merged
merged 46 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
83cc654
Switch Icon
Nov 9, 2023
61422d2
Fix some bugs
Nov 9, 2023
86e6ef4
Open_Source_LLM Tool - Restore Dynamic List
Nov 9, 2023
f017687
a1 - is_serverless_endpoint function supports inference + serverless
Nov 9, 2023
9a1a529
Working on Completion FT
Nov 9, 2023
a877c0e
a2 - use requests lib to support serverless FT. (Completion only)
Nov 10, 2023
20fb923
clean ups
Nov 10, 2023
7fc2b1d
Update for Request
Nov 13, 2023
38bc064
Update for tests
Nov 28, 2023
38a9a48
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Nov 28, 2023
b9c11c9
Merge branch 'users/gewoods/dynamiclist/restore' into users/gewoods/s…
gjwoods Nov 28, 2023
614b348
Clean up
gjwoods Nov 29, 2023
33bbfb9
Merge pull request #10 from gjwoods/users/gewoods/serverless/cache_re…
gjwoods Nov 29, 2023
f921a63
A little more
gjwoods Nov 29, 2023
fcd8dd0
Spelling
gjwoods Nov 29, 2023
6ce8e81
Handle flakes
gjwoods Nov 29, 2023
6193b7c
Merge pull request #11 from gjwoods/users/gewoods/serverless/cache_re…
gjwoods Nov 29, 2023
6eed2e1
Try some changes
gjwoods Nov 29, 2023
b92d091
try some more
gjwoods Nov 29, 2023
9ea7b99
better exceptions
gjwoods Nov 29, 2023
caceb07
Try cleaning
gjwoods Nov 29, 2023
db60810
fake creds check them
gjwoods Nov 30, 2023
0cf0720
more logging
gjwoods Nov 30, 2023
c0320c4
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Nov 30, 2023
15d1cfc
more loggin and merge
gjwoods Nov 30, 2023
5410740
Try this
gjwoods Nov 30, 2023
f569d33
damn that was frustrating
gjwoods Nov 30, 2023
97e85c4
unblocked
gjwoods Nov 30, 2023
0ba6418
unblocked v2 - flake
gjwoods Nov 30, 2023
bd4613d
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Nov 30, 2023
988a288
are we done?
gjwoods Nov 30, 2023
cce3850
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Dec 1, 2023
9fe7e11
1st round review comments
Dec 1, 2023
70c6326
Update common.py
gjwoods Dec 1, 2023
24fa2f9
Update version.txt
gjwoods Dec 1, 2023
d3bb105
revert this
Dec 1, 2023
7baf874
Automated Pull Master Merge Fri 12/01/202314:13:55.82
Dec 1, 2023
c469d2b
blah
Dec 1, 2023
5a4117d
Fix tests
Dec 2, 2023
85960bf
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Dec 4, 2023
b9f2817
Update documentation
Dec 5, 2023
1784cba
Merge branch 'users/gewoods/dynamiclist/restore' of https://github.co…
Dec 5, 2023
89435fa
model contract
Dec 5, 2023
da9a54e
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Dec 5, 2023
8f943bd
Update error handling
Dec 5, 2023
2750508
Merge branch 'main' into users/gewoods/dynamiclist/restore
gjwoods Dec 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@
"Abhishek",
"restx",
"httpx",
"tiiuae"
"tiiuae",
"metagenai"
],
"flagWords": [
"Prompt Flow"
Expand Down
8 changes: 4 additions & 4 deletions src/promptflow-tools/promptflow/tools/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import re
import sys
import time
from typing import List, Mapping
from typing import List, Mapping, Set

from jinja2 import Template
from openai import APIConnectionError, APIStatusError, OpenAIError, RateLimitError, APITimeoutError
Expand All @@ -27,12 +27,12 @@ def __str__(self):
return "\n".join(map(str, self))


def validate_role(role: str, valid_roles: List[str] = None):
def validate_role(role: str, valid_roles: Set[str] = None):
gjwoods marked this conversation as resolved.
Show resolved Hide resolved
if not valid_roles:
valid_roles = ["assistant", "function", "user", "system"]
valid_roles = {"system", "user", "assistant", "function"}

if role not in valid_roles:
valid_roles_str = ','.join([f'\'{role}:\\n\'' for role in valid_roles])
valid_roles_str = ','.join(sorted([f'\'{role}:\\n\''for role in valid_roles]))
error_message = (
f"The Chat API requires a specific format for prompt definition, and the prompt should include separate "
f"lines as role delimiters: {valid_roles_str}. Current parsed role '{role}'"
Expand Down
Loading
Loading