Skip to content

Commit

Permalink
Merges main into branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rachfop committed Feb 16, 2024
2 parents 58a5e7a + 6bcab28 commit 39b6d04
Show file tree
Hide file tree
Showing 6 changed files with 704 additions and 510 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python: ["3.7", "3.11"]
python: ["3.8", "3.12"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -32,9 +32,9 @@ jobs:
- run: poe test -s -o log_cli_level=DEBUG
- run: poe test -s -o log_cli_level=DEBUG --workflow-environment time-skipping

# On non-3.7, run gevent test
# On latest, run gevent test
- name: Gevent test
if: ${{ matrix.python != '3.7' }}
if: ${{ matrix.python == '3.12' }}
run: |
poetry install --with gevent
poetry run python gevent_async/test/run_combined.py
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the set of Python samples for the [Python SDK](https://github.com/tempor

Prerequisites:

* Python >= 3.7
* Python >= 3.8
* [Poetry](https://python-poetry.org)
* [Local Temporal server running](https://docs.temporal.io/application-development/foundations#run-a-development-cluster)

Expand Down
2 changes: 1 addition & 1 deletion langchain/activities.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from dataclasses import dataclass

from langchain_openai import ChatOpenAI
from temporalio import activity

from langchain.chat_models import ChatOpenAI
from langchain.prompts import ChatPromptTemplate


Expand Down
3 changes: 2 additions & 1 deletion langchain/starter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from contextlib import asynccontextmanager
from uuid import uuid4

import uvicorn
from activities import TranslateParams
Expand All @@ -23,7 +24,7 @@ async def translate(phrase: str, language: str):
result = await client.execute_workflow(
LangChainWorkflow.run,
TranslateParams(phrase, language),
id=f"langchain-translation-{language.lower()}-{phrase.replace(' ', '-')}",
id=f"langchain-translation-{uuid4()}",
task_queue="langchain-task-queue",
)
translation_content = result.get("content", "Translation not available")
Expand Down
Loading

0 comments on commit 39b6d04

Please sign in to comment.